[Custom Component] Stateful Scenes

Yes understand - it’s definitely in the realm of a feature request. The functionality you have now is the biggest thing though, once the bugs are all squished!

This addition is so awesome! Working really great for me, especially so when turning off transition time. One question, maybe I missed something but is it possible to change the Rounding tolerance after the fact?

Hi @hugobloem This is really cool, thanks a lot!

Quick question: How can I use stateful scene switches to trigger an automation?

trigger:
  - platform: state
    entity_id: switch.my_stateful_scene 
    to: "on"

does not work. neither do varations like to: null

My usecase: I have a script that turns off all my presence sensor based light automations. My goal is to automatically run this script whenever a stateful scene turned/is on.

Edit:

Question 2:

Toggling a stateful scene button with the same UI element also does not work. Can you advise on what to do, so that I can avoid having two buttons (one for on, one for off) for each scene?

Thanks!

Hi @DIYMax

Regarding your second question, it seems like the stateful scene may not be inferred correctly. Does turning on the scene via the switch work? If not, do you get any error messages in the log? If this does work, is the state of the switch then updated correctly?

I assume you have tried to restart HA to see if that resolves things.