home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.57k stars 29.91k forks source link

HomeMatic climate entities are no longer showing #114807

Closed tpazderka closed 5 months ago

tpazderka commented 5 months ago

The problem

After upgrade to 2024.4.0, HomeMatic fails to setup Climate entities. As far as I can tell, other entities might not be affected (I have only window opening sensors and they work fine).

What version of Home Assistant Core has the issue?

2024.4.0

What was the last working version of Home Assistant Core?

2024.3.1

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Homematic

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.climate
Zdroj: helpers/entity_platform.py:787
integrace: Klima (dokumentace, problémy)
První výskyt: 07:56:28 (6 výskyty)
Naposledy logováno: 07:56:28

Error adding entity None for domain climate with platform homematic
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 787, in _async_add_entity
    capabilities=entity.capability_attributes,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 328, in __getattribute__
    return super().__getattribute__(__name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 501, in capability_attributes
    data[ATTR_PRESET_MODES] = self.preset_modes
                              ^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 328, in __getattribute__
    return super().__getattribute__(__name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/homematic/climate.py", line 116, in preset_modes
    return [HM_PRESET_MAP[mode] for mode in self._hmdevice.ACTIONNODE]
            ~~~~~~~~~~~~~^^^^^^
KeyError: 'AUTO_MODE'

Additional information

No response

home-assistant[bot] commented 5 months ago

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

Code owner commands Code owners of `homematic` 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 homematic` 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)


homematic documentation homematic source (message by IssueLinks)

hrzlgnm commented 5 months ago

I also have this issue and downgraded to 2024.03.3 meanwhile.

Blackhawk386 commented 5 months ago

Same problem here, would be very thankful for a fast fix.

bbr111 commented 5 months ago

Same here, after upgrade.

bbr111 commented 5 months ago

This code was changed in last commit of this file from

    @property
    def preset_modes(self):
        preset_modes = []
        for mode in self._hmdevice.ACTIONNODE:
            if mode in HM_PRESET_MAP:
                preset_modes.append(HM_PRESET_MAP[mode])
        return preset_modes

to

    def preset_modes(self):
        """Return a list of available preset modes."""
        return [HM_PRESET_MAP[mode] for mode in self._hmdevice.ACTIONNODE]

commit #113168 by @joostlek

joostlek commented 5 months ago

Oh that's a bug indeed

stuartlea commented 5 months ago

Same issue for me. The log says the integration starts ok but each entity appears as "None" and appears as python KeyError.

2024-04-04 09:03:53.861 ERROR (MainThread) [homeassistant.components.climate] Error adding entity None for domain climate with platform homematic Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 787, in _async_add_entity capabilities=entity.capability_attributes, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 328, in __getattribute__ return super().__getattribute__(__name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 501, in capability_attributes data[ATTR_PRESET_MODES] = self.preset_modes ^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 328, in __getattribute__ return super().__getattribute__(__name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/homematic/climate.py", line 116, in preset_modes return [HM_PRESET_MAP[mode] for mode in self._hmdevice.ACTIONNODE]

Rolled back to 2024.3 until it can be resolved.

mtdnet commented 5 months ago

BUG also confirmed in Version 2024.4.1

macmeck commented 5 months ago

Pull request is marked for milestone 2024.4.2 only #114832

RobinBeismann commented 5 months ago

Do we have an ETA when 2024.4.2 is going to come out? For me, it's not only affecting Heating (which I could live with), but also two presence detectors and I almost broke my toe yesterday walking against a drinks crate in the dark..

joostlek commented 5 months ago

Before the weekend probably

macmeck commented 5 months ago

@RobinBeismann , it has been released...

TheSmartGerman commented 5 months ago

It seems work again, my thermostats are back :)