Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Steering the fan via actions #102

Closed
3 tasks done
knulle2024 opened this issue Sep 7, 2024 · 3 comments
Closed
3 tasks done

Steering the fan via actions #102

knulle2024 opened this issue Sep 7, 2024 · 3 comments

Comments

@knulle2024
Copy link

Checklist

  • I have filled out the template to the best of my ability.
  • This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.

I'm running the integration with oxxify smart 50 fans, and the connection to the fans was easily made, so first of all thx a lot for this great integration!
My problem (and most likely I'm the problem myself being new to home assistant):
I'm not able to adress the fans via code. The only solution I found is "on" "off" and "toggle". For my automation I would need full access to the controls that are shown (Level 1 2 3, boost , party, auto on/off...). as it is possible to control these features "manually", obviously the required commands are known.

Describe the solution you'd like

A documentation how to access the additional control features via code/ automation

Describe alternatives you've considered

No alternatives

Additional context

not required I guess

@rostwolke
Copy link

rostwolke commented Sep 7, 2024

I had the exact same problem a couple of hours ago. When I checked the source code I noticed that the fan speed can be indeed set (sorry, my HA is in German):
grafik

If you directly want to add a button without opening the entity you can give a script a try. Once mine is done I will share it here. For automations there is an action which is probably called something like "Fan: Set fan speed" in english:
grafik

@knulle2024
Copy link
Author

Great! Made my day... Thx a lot! Searching for "Lüfter" in automations did the trick. (My HA is also in German...)

@rostwolke
Copy link

rostwolke commented Sep 7, 2024

Amazing. Here as promised my card:

entity: fan.fan_dennis
type: custom:multiple-entity-row
attribute: percentage
name: Fan speed
show_state: false
entities:
  - icon: mdi:fan-off
    tap_action:
      action: call-service
      service: fan.set_percentage
      service_data:
        entity_id: fan.fan_dennis
        percentage: 0
  - icon: mdi:fan-speed-1
    tap_action:
      action: call-service
      service: fan.set_percentage
      service_data:
        entity_id: fan.fan_dennis
        percentage: 33
  - icon: mdi:fan-speed-2
    tap_action:
      action: call-service
      service: fan.set_percentage
      service_data:
        entity_id: fan.fan_dennis
        percentage: 66
  - icon: mdi:fan-speed-3
    tap_action:
      action: call-service
      service: fan.set_percentage
      service_data:
        entity_id: fan.fan_dennis
        percentage: 100
card_mod:
  style: >
    :host .entity:nth-child({{ (state_attr('fan.fan_dennis', 'percentage') / 33
    + 1)|int }}) .icon-small {
      color: var(--rgb-state-default-color);
    }

It will only work properly if you install the two following plugins (available on HACS):

  • card-mod
  • multiple-entity-row

In the end it will look like this which in my opinion is far better to control:
grafik

If this fully solved your problem, please don't forget to close your issue to save the plugin author some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants