Skip to content

HomeKit fan state for defrosting, preheating #145284

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

Open
jz-v opened this issue May 20, 2025 · 2 comments · May be fixed by #145353
Open

HomeKit fan state for defrosting, preheating #145284

jz-v opened this issue May 20, 2025 · 2 comments · May be fixed by #145353
Assignees

Comments

@jz-v
Copy link

jz-v commented May 20, 2025

The problem

Currently there's no HomeKit fan state for a HA climate entity that is defrosting or preheating.

Appears to simply be that HVACAction.PREHEATING and HVACAction.DEFROSTING are not in the HC_HASS_TO_HOMEKIT_FAN_STATE dictionary.

Should I open a PR to add, or am I missing something regarding how this works?

e.g.
HC_HASS_TO_HOMEKIT_FAN_STATE = {
...
HVACAction.PREHEATING: FAN_STATE_IDLE,
HVACAction.DEFROSTING: FAN_STATE_IDLE,
}

What version of Home Assistant Core has the issue?

core- 2025.5.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

HomeKit Bridge

Link to integration documentation on our website

https://www.home-assistant.io/integrations/homekit/

Diagnostics information

N/A

Example YAML snippet

Anything in the logs that might be useful for us?

Logger: homeassistant.helpers.event
Source: helpers/event.py:355
First occurred: May 17, 2025 at 9:44:31 AM (23 occurrences)
Last logged: 4:01:30 PM

Error while dispatching event for climate.ducted to <Job track state_changed event ['climate.ducted'] HassJobType.Callback <bound method HomeAccessory.async_update_event_state_callback of <accessory display_name='Ducted AC' services=['AccessoryInformation', 'Thermostat', 'Fanv2']>>>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 355, in _async_dispatch_entity_id_event
    hass.async_run_hass_job(job, event)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 938, in async_run_hass_job
    hassjob.target(*args)
    ~~~~~~~~~~~~~~^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/homekit/accessories.py", line 538, in async_update_event_state_callback
    self.async_update_state_callback(new_state)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/homekit/accessories.py", line 562, in async_update_state_callback
    self.async_update_state(new_state)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/homekit/type_thermostats.py", line 697, in async_update_state
    self._async_update_fan_state(new_state)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/homekit/type_thermostats.py", line 727, in _async_update_fan_state
    HC_HASS_TO_HOMEKIT_FAN_STATE[hvac_action]
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: <HVACAction.PREHEATING: 'preheating'>

Additional information

No response

@home-assistant
Copy link

Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration (homekit) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of homekit can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign homekit Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


homekit documentation
homekit source
(message by IssueLinks)

@bdraco
Copy link
Member

bdraco commented May 20, 2025

Should I open a PR to add, or am I missing something regarding how this works?

Yes. These are new and HomeKit has yet to be updated to map them.

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