I have set up a button helper, which trigger an automation blueprint to run an entity (pool pump) for x hours.
I have set up 2 buttons, 1 hour and 3 hours and have setup the automation accordingly so when the correct button is pressed, it triggers the correct automation.
My problem is on the frontend, the icon displays as blue as if it is on or active but it is not, it just displays this way no matter what. Is there any reason why this is happening?
YAMl code would be nice and my guess is that you set the state of the button to the state of the automation, but that state is not if it is running or not, but instead if it is enabled or disabled.
You would need to make a helper for running state and set it at start and unset it at end.
A button is momentary switch e.g. it just sends a click and returns to its original state. You want a toggle, which does on and off. You will need to swtch the toggle off in the automation when the time has past.