cgiesche / streamdeck-homeassistant

Control your Home Assistant devices from StreamDeck
MIT License
772 stars 38 forks source link

Is it possible to have entity buttons that don't toggle the state when pressed? #166

Closed julianrinaldi closed 8 months ago

julianrinaldi commented 1 year ago

I have a StreamDeck page with buttons displaying motion binary sensor entities for all of my cameras. If there is motion detected, the background icon changes to red. With no motion, the background is green. I have a service call that pulls up the cameras on my AppleTV when I short press the button. But when I do that, it also toggles the binary sensor. Is there a way to have it so that pressing the button to make the service call doesn't toggle the binary sensor? If not, could this be implemented?

julianrinaldi commented 12 months ago

I just sent you a bribe since this is such a great plugin. I'm hoping you understand what I mean. I'm using the "Entity (custom icons)" button. It allows me to have a binary sensor display a different icon depending on whether it's off or on. And it allows me to have a short and long press for two different service calls. You can see in the video below that when I press the button it sends a service call to my Apple TV to switch a camera view.

In my case, the binary sensor I'm displaying is a motion sensor. So the icon changes to red if there is motion. But it also changes to red if I press the button. I originally though it changed the state of the binary sensor, but it doesn't. Can you make an option so that when you press the key it doesn't toggle between the two backgrounds for "off" and "on"? It would be a huge quality of life improvement as far as how I use your plugin.

Here is a video of what I'm talking about: (the red background would come on if that binary sensed motion, but comes on whenever you press it)

https://streamable.com/a7g3xg

julianrinaldi commented 11 months ago

I saw in another issue that this isn't possible due to limitations by Elgato. But I came up with a solution that might help others. I created some custom template sensors using emojis 😂 that can be set as a custom title and just used the same icon for the on and off state. Here is a video showing it in action:

https://streamable.com/w7wyx1

cgiesche commented 11 months ago

Hi,

sorry for my late reply and thank you very much for the bribe :D. I hope you still like the plugin even if i can not fix your issue due to the mentioned limitations.