Hi All,
New to Home Assistant, but making some progress. I have a light-control script that includes a delay of 10 minutes and a corresponding script widget on my HADashboard. I have set the active icon color to red to indicate the script is running. When I click on the script widget to activate the script, the icon turns red for a few seconds then back to white, even though the script is still running. When I force a page refresh it goes back to red. Do I need to add something to the widget definition to ensure it reflects the current script activity with the need to reload? My widget definition and script are below. Thanks! Scott
you start a script in home assistant by creating an event, but there is no state like on or off. or running.
thats why the script widgets turns to off after 300 mS by default.
you can fake the time that the script is running.
by using the setting momentary.
it is set in milliseconds. so you need 600,000 milliseconds like
momentary: 600000
but remember its only a visual effect. if the script stops working, or something like that, it wont show in the button.
Okay, thanks for the help! I’ll try that. It’s strange though because if I reload the page the icon is back in the “active” red state (and the script switch is shown as ‘on’ in the normal home assistant UI) for the 10min delay.
Maybe a long work-around, but you could have an automation trigger the script when you press an input_boolean. Your script could then reset the input_boolean when the script finishes as the last step of the script. Then you could use the input_boolean in your dashboard to trigger the script. That way, the input_boolean would show the correct state in your dashboard.