anotherjulien / MyHOME

MyHOME integration for Home-Assistant
GNU Affero General Public License v3.0
137 stars 57 forks source link

Loss of assigned zone/area upon HA restart #38

Closed o2rr closed 2 years ago

o2rr commented 2 years ago

Hello,

Firstly I would like to thanks for the great job you've done, the integration is working very well with my Legrand F454.

I only have an issue with the area/zone assigned to devices and which are no longer persistent since few HA versions.

I can properly assign HA area/zones to MyHome devices, but those assignment are lost and set back to blank after each HA restart. This is quite strange as those assignments were persistent for months and suddenly after an upgrade (of HA and/or the integration) they become not persistent to HA restart.

Not sure if relevant or not but please find hereafter an error and warning message found in the HA journal logs:


Logger: homeassistant Source: custom_components/myhome/config_flow.py:402 Integration: MyHome (documentation, issues) First occurred: 14:25:02 (1 occurrences) Last logged: 14:25:02

Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/discovery_flow.py", line 74, in _async_process_pending_flows await gather_withconcurrency( File "/usr/src/homeassistant/homeassistant/util/async.py", line 170, in gather_withconcurrency return await gather( File "/usr/src/homeassistant/homeassistant/util/async.py", line 168, in sem_task return await task File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 203, in async_init flow, result = await task File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 230, in _async_init result = await self._async_handle_step(flow, flow.init_step, data, init_done) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 325, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) File "/config/custom_components/myhome/config_flow.py", line 402, in async_step_ssdp discovery_info["port"] = None TypeError: 'SsdpServiceInfo' object does not support item assignment



Logger: homeassistant.helpers.frame Source: helpers/frame.py:103 First occurred: 14:25:02 (1 occurrences) Last logged: 14:25:02

Detected integration that accessed discovery_info.contains() instead of discovery_info.upnp.contains() or discovery_info.ssdp_headers.contains(); this will fail in version 2022.6. Please report issue to the custom component author for myhome using this method at custom_components/myhome/config_flow.py, line 401: if "port" not in discovery_info:


Many thanks, Olivier

anotherjulien commented 2 years ago

This issue was fixed in cd7cf7d7f8a704b53d5edf66fad1766b25941be7, it's not yet part of a release but will be in the next one. You can use the master version in the meantime if you want.

bubez81 commented 2 years ago

Hello, I think this problem is not resolved, even with the master version, after a couple of reboots the areas are cleared again

anotherjulien commented 2 years ago

I tested right now, no problem to report...

bubez81 commented 2 years ago

I tested right now, no problem to report...

Strange....with master?

anotherjulien commented 2 years ago

yeah, with the latest/current master. I have a problem with HACS on a test docker however. If I ask to upgrade or reinstall the master, it says it does it, but in fact it does not. Even HACS itself cannot be upgraded, maybe you have a similar problem?

bubez81 commented 2 years ago

Ah ok I'll try to remove the integration reboot and readd the master!