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

Support for custom fan speeds #185

Open
zach-rosen opened this issue Jan 2, 2025 · 0 comments
Open

Support for custom fan speeds #185

zach-rosen opened this issue Jan 2, 2025 · 0 comments

Comments

@zach-rosen
Copy link

I'm the guy who's Kumo's report 3 speeds but support 4 (superQuiet). You made changes to help support my case, but I'm still seeing the following error from HA:

2024-12-28 13:49:37.523 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139728785595776] Fan mode superQuiet is not valid. Valid fan modes are: quiet, low, powerful, auto

I believe that this is because the kumo/climate.py implementation of fan_modes is returning an internal variable, which overrides the customization settings I've put in the config.yaml

Kumo Climate

    def __init__(self, coordinator: KumoDataUpdateCoordinator):
        self._fan_modes = self._pykumo.get_fan_speeds()
        
    def fan_modes(self):
        return self._fan_modes

HA Climate

    @cached_property
    def fan_modes(self) -> list[str] | None:
        return self._attr_fan_modes

When the HA Climate implementation runs self._valid_mode_or_raise("fan", fan_mode, self.fan_modes), it gets the self.fan_modes Kumo reports (3):

    @final
    async def async_handle_set_fan_mode_service(self, fan_mode: str) -> None:
        """Validate and set new preset mode."""
        self._valid_mode_or_raise("fan", fan_mode, self.fan_modes)
        await self.async_set_fan_mode(fan_mode)

but accessing fan_modes from a template shows the customized values (4):

{{ state_attr("climate.living_room", "fan_modes") }}
Result type: list
[
"superQuiet",
"quiet",
"low",
"powerful",
"auto"
]

Is there a way to support the customization of fan speeds from config.yaml?

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

1 participant