What can cause the plug status not to change in HA

Hi, i recently noticed that when i swith Broadling plug manual or via Alexa the plug status is not changing in the HA dashboard. If i switch it from dashboard it is working.
When it is by the plug or by alexa i have this error. Any idea for solution ?

2023-02-07 09:20:23.237 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved

Traceback (most recent call last):

File “/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py”, line 182, in _handle_refresh_interval

await self._async_refresh(log_failures=True, scheduled=True)

File “/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py”, line 330, in _async_refresh

self.async_update_listeners()

File “/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py”, line 135, in async_update_listeners

update_callback()

File “/usr/src/homeassistant/homeassistant/components/broadlink/entity.py”, line 38, in _recv_data

self._update_state(self._coordinator.data)

File “/usr/src/homeassistant/homeassistant/components/broadlink/sensor.py”, line 127, in _update_state

self._attr_native_value = data[self.entity_description.key]

KeyError: ‘power’

First you should try deleting the device in HA and adding it again. It’s an easy thing to try at least.

This is possibly a problem with the integration - it is expecting to get a sensor property called ‘power’, but it does not exist. It may be that it doesn’t currently support the model you have - what is it specifically? Others may be able to tell you if they have the same and it works - I only have Broadlink IR blasters, not plugs. Assuming Broadling is a typo, because I can’t see any such thing.

You may be able to get it working by setting the power entity to “disabled” in the integration’s device page. Obviously then you will not get power readings, but at least the status might update correctly, and I assume you’re currently not getting power readings anyway.

I would suggest you create an Issue in the Home Assistant github: Sign in to GitHub · GitHub

Then the codeowner of the Broadlink integration will notice your problem for sure.

Broadlink does not update the state of things instantly, it polls and it only polls sensors, lights and some switches. It does not poll all switches. If your switch was automatically created, it’ll be polled. If you created it by hand in configuration.yaml, it will not be polled.

Lastly polling means that the integration will periodically look for a state. For most integrations, the polling frequency is every 30 seconds. So if you manually turn on a switch, it can take upwards of 30 seconds for HA to see the change.

it is not that. i am waiting minutes and nothings hapens. Now the switch was on by the HA and in the log file i have more than 50 errors same as the above. Probably will try to delete it and add it again.

those errors are related to a sensor. Disable your power sensors on that device.