cgiesche / streamdeck-homeassistant

Control your Home Assistant devices from StreamDeck
MIT License
819 stars 40 forks source link

Binary Lights don't show up correctly and fall back to showing the HA logo. #295

Closed NBSgamesAT closed 1 month ago

NBSgamesAT commented 1 month ago

Description

Making a generic entity button on Streamdeck and set it's entity to a binary light will cause it to show up with the HA logo and a warning triangle instead of as any other switch.

Effected Version: 3.5.2 (As of per Streamdecks Software) 3.5.1 (As per Github releases)

Steps to reproduce

Expected Behaviour

The button switches from the generic HA logo to a switch icon and shows the state of the light

Actual Behaviour

The buttons stays as the generic HA buttons and even shows the warning triangle when you attempt to press it.

Other nodes:

The press and long press actions do not seem to be effected in any way.

I have also posted a picture of the esphome config of the light causing this issues and a picture of what it shows up as on the Streamdeck

ESP home config of the light What it shows up on the SD
tomazbc commented 1 month ago

Same issue, after the update one of two icons I have defaults to the HA logo. Since it auto updated took me a while to figure out that that update broke it.

Funny thing is, they both control the same type of device, light, just one refuses to show the changing light status icon.

cgiesche commented 1 month ago

Thank you for you reports!

Can you tell me what kind of entity this "binary light source" is? Is it a "binary_sensor" with device_class "light"? I have both normal "light" entities and "switch" entities, as well as some binary_sensors that work as expected.

Maybe you can send me a screenshot from inside the home-assistant developer tools with details for that entity: grafik

cgiesche commented 1 month ago

Funny thing is, they both control the same type of device, light, just one refuses to show the changing light status icon.

Is there a difference between those lights? Maybe one of them has color support and the other is simple on/off?

NBSgamesAT commented 1 month ago

The developer tools in HA. right. I've forgotten that those existed as I might the light.

Can you tell me what kind of entity this "binary light source" is? Is it a "binary_sensor" with device_class "light"? I have both normal "light" entities and "switch" entities, as well as some binary_sensors that work as expected.

With binary light I meant a light that is truly just on/off. No colour support, no dimming, no nothing. I have a few lights that do have full rgb color support and can also dim, that light works as expected, and even shows with a light bulb icon.

Here is the HA Developer Tools from one of the lights that don't work correctly:

Light that doesn't work

Here's an other one:

Light that also doesn't work.

And for completeness: This one does work:

This one works, possibly because of the rgb color support, possibly because of some of the other infos in there
cgiesche commented 1 month ago

Ok, i found out, what may be the problem:

For encoders on StreamDeck+ I use the brightness-attribute. This is not present on your light entities and causes the problem. I will try to fix this asap.

Maybe you can verify this by adding brightness: null to one of your non-working entities and press "set state". This should make it working (at least until home-assistant updates the state and removes that attribute again).

cgiesche commented 1 month ago

I fixed the issue. Luckily i was able to fix this in the configuration that is automatically updated in the plugin. Unfortunately, the stream deck seems to cache this config. So it may get this updated version in 7 days from now :/

As a workaround, you may want to switch the display configuration to "preview": grafik

NBSgamesAT commented 1 month ago

Thanks mate, I can confirm, you fixed it.

I was able to set the display configuration back to stable afterwards and it continues working.