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

New feature flags for Fan platform #2164

Open
make-all opened this issue Jul 29, 2024 · 3 comments
Open

New feature flags for Fan platform #2164

make-all opened this issue Jul 29, 2024 · 3 comments
Labels
awaiting confirmation Wating for confirmation the issue is solved bug Something isn't working unreleased Will be in next release

Comments

@make-all
Copy link
Owner

In HA 2024.8, new flags are being introduced for FanEntityFeature.TURN_ON and TURN_OFF.

As with the climate platform when these were introduced there, there is an ugly hack of setting an internal attribute when the change has been made to avoid poorly implemented warnings.

https://developers.home-assistant.io/blog/2024/07/19/fan-fanentityfeatures-turn-on_off

@make-all make-all added bug Something isn't working maintenance Changes to keep up with HA development and removed bug Something isn't working labels Jul 29, 2024
make-all added a commit that referenced this issue Aug 25, 2024
make-all added a commit that referenced this issue Aug 27, 2024
@make-all make-all added awaiting confirmation Wating for confirmation the issue is solved unreleased Will be in next release labels Aug 27, 2024
make-all added a commit that referenced this issue Aug 27, 2024
@make-all make-all removed awaiting confirmation Wating for confirmation the issue is solved unreleased Will be in next release maintenance Changes to keep up with HA development labels Sep 8, 2024
@make-all make-all closed this as completed Sep 8, 2024
@zaubara
Copy link

zaubara commented Sep 11, 2024

Amazing, thank you!
Unfortunately turning it off doesn't work without issue; its always displayed at 20% (even when off), and using the fan switch reports that the action fan/turn_off couldn't be run and is not supported by the device. Maybe another issue with #2243?

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2761, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2804, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 978, in entity_service_call
raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Entity fan.dunstabzug does not support this service.

@make-all
Copy link
Owner Author

Are you perhaps using a fan which does not support turning on/off?

@zaubara
Copy link

zaubara commented Sep 11, 2024

It's controlled with the speed settings 1 through 4, and 0 turns it off (in addition to the main off switch). That is "supporting it", I think?
Maybe there needs to be a mapping to speed 0 being the "turn off" function? It worked on the older HA / plugin version, unfortunately I'm not sure when exactly it stopped working.
Sorry, I meant to post this in #2258.

make-all added a commit that referenced this issue Sep 11, 2024
Home Assistant used to handle this for us, but no longer seems to.
In any case the TURN_OFF feature flag is needed now.

Issue #2164
@make-all make-all added bug Something isn't working awaiting confirmation Wating for confirmation the issue is solved unreleased Will be in next release labels Sep 11, 2024
@make-all make-all reopened this Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting confirmation Wating for confirmation the issue is solved bug Something isn't working unreleased Will be in next release
Projects
Status: ✅ Done
Development

No branches or pull requests

2 participants