krahabb / meross_lan

Home Assistant integration for Meross devices
MIT License
454 stars 47 forks source link

Wrong icon if plug is enabled #153

Closed nchieffo closed 2 years ago

nchieffo commented 2 years ago

Version of the custom_component

2.4.3

Describe the bug

I have 3 meross plugs and the icon shown in home assistant is always a mdi:power-plug-off, no matter if the plug is on or off. Is it correct? I thought the icon should change to mdi:power-plug when the plug is enabled

image

image

krahabb commented 2 years ago

Hello @nchieffo , Yeah...I don't know for sure. In my code there's no state update for any icon (nor I really set any icon information so it's all 'by HA default') so I gues it should be up to HA to automatically set the proper icon type/state but maybe I'm wrong. I'll maybe check what other integrations do on the matter and fix it if it's fixable

krahabb commented 2 years ago

Well... I really don't know if the last HA core (2022.2.x) added something or not but it looks like on this newer release it works correctly if you don't override the icon in configuration. My 'production' instance is still on HA core 2021.11.x and it doesn't update the icon state (showing the same behaviour as yours) Also to note, I have the FritzBox integration too on my production instance (it looks like you have the same kind of setup in some way) and I don't know if it's 'colliding' somehow or if it's just the older HA core not providing icon updates. If you can check by updating the core the icon is now working we could forget about this issue :)

nchieffo commented 2 years ago

Same for me, fixed