Closed JurajNyiri closed 2 years ago
I have rolled back to Home Assistant 2022.02.9 using command ha core update --version 2022.2.9
. I have left the integration code exactly like described above (so 0.3.3 with https://github.com/StyraHem/ShellyForHASS/pull/658) and everything works again.
So there must be something new in 2022.03.0 breaking the entity IDs.
Same here. Interesting though: Before this my total consumption sensors were broken a I couldn't figure out why in any way. After upgrading and then rolling back because of issues now everything works fine as it never has before. My thought while looking at the error messages was that the prefixes (Sensor, switch...) of the entities were missing. But I am not sure how to interprete this here. Greetings Blubbel
I think it’s this based on the errors: https://www.home-assistant.io/blog/2022/03/02/release-20223/#updates-for-custom-integration-developers
@hakana - FYI
Helper: split_entity_id() split_entity_id will now raise a ValueError if the passed value does not follow the basic entity ID format (
. Previously it could return a list with a single item.
Another observation. I got the shelly integration running by applying #658 (which wasn't that easy as I first had to remove the integration, delete and reinstall via HACS and then reconfigure the integration - otherwise I couldn't get HA to restart as it was complaining about that version conflict). I am still having two tons of error messages in the log though.
Now I have two Shelly integrations shown in the configuration:
I'm using yaml based configuration. The first one is for that, the second one looks like a UI based integration. Digging deeper, the first one lists 17 devices and 42 entities:
The second one 17 devices (the same) and 11 entities.
The 11 entities of integration # 2 seem to be *_over_power
and *_over_temp
binary_sensors that I have excluded in the yaml configuration.
There is also one total_consumption sensor sensor.shelly_shplg_s_df20ac_total_consumption
. The others are part of # 1 above. None of them though should be there, some look like duplicates for sensors that are properly named (using the device name), others shouldn't be there at all as they are excluded in the yaml configuration.
One more detail that may be related is I have chosen no prefix id_prefix: "" # no prefix
for the entities. This worked fine up until now.
same problem! I changed on manifest from 1.5.1 to 1.6.1 but when I check the configuration it gives me this error "Integration error: shelly - Requirements for shelly not found: ['paho-mqtt == 1.5.1']."
I have created a new beta version bumping to 1.6.1 but it look like there are other problems also. I will look on that during the day.
same here
I am working on a fix, ETA 1-2 hour.
Current consumption and switches already fixed.
Issue is inside https://github.com/StyraHem/ShellyForHASS/blob/master/custom_components/shelly/sensor.py#L63
where ShellyDevice.init function sets entity id in a format of ".something", without the platform.
This is then done properly in some places, like for example ShellyVersion sensor, where platform is added. This does not happen for other classes, such as ShellySensor or ShellySwitch which stopped working in 2022.03.x because of invalid format of entity_id.
Obvious fix is doing something like
ShellyDevice.__init__(self, dev, instance)
self._unique_id += "_" + sensor_name
self.entity_id = "sensor" + self.entity_id + "_" + sensor_name
and similarly for all the other classes, however I think it should be fixed properly inside the ShellyDevice.init and then all the other code adding platform shall be removed.
@hakana thoughts?
Investigated architecture further and I think I will go with the obvious fix stated above and already done today for some classes.
Fix available in PR https://github.com/StyraHem/ShellyForHASS/pull/660 .
I will test it in half an hour. Thx for the quick fix!
Juraj Nyíri @.***> schrieb am Do., 3. März 2022, 12:31:
Fix available in PR #659 https://github.com/StyraHem/ShellyForHASS/issues/659 .
— Reply to this email directly, view it on GitHub https://github.com/StyraHem/ShellyForHASS/issues/659#issuecomment-1057951452, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMPS5IMRUXWJV7S6PZ3X2RDU6CPIBANCNFSM5PY6FO7A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID: @.***>
I did integrate your changes manually and it looks like it is working now. Needed a bit of cleanup to eliminate the orphan entities and 2nd integration that had been created by the defective version. Everything seems to be working fine now.
Thanks a lot for the quick remedy - now we have heating again in our living room. I've implemented a thermostat using a shelly switch which wasn't working anymore. Makes me think if I should make that dependent on the home automation ... ;-).
anyway, thanks again!
Fix available in PR #660 .
So we must wait for a new release?
Issue is now fixed in Release 0.3.4.
issue not fixed at all, just did update, shelly failed, did a rollback
Update
Fix is available inside PR https://github.com/StyraHem/ShellyForHASS/pull/660 .
Environment
Describe the bug
Installed Home Assistant 2022.03.0, applied https://github.com/StyraHem/ShellyForHASS/pull/658 to fix https://github.com/StyraHem/ShellyForHASS/issues/655 . Restarted, now most of the entities are not working.
Total consumption and firmware switch entities are working, current consumption entities are not.
Steps to Reproduce
Expected behavior
Current consumption and other entities should be working.
Screenshots
Traceback/Error logs
Additional context