Button press state delay

Hi, is there any simple way to hold button icon state “on” after press for some period of time until confirmed by other entity? When I press button an action is performed but state change of controlled entity take some time (say 30s) so I want button to show state “on” till the confirmation, so the user do not press the button again and again. The button should show the real state of the entity after the delay.

Hi Sikita,

Actual official ‘Buttons’ in HA are actually events (instantaneous). There are buttons with hold features. My suggestion is doing the ‘hold’ in your automation or something.
Every switch and situation has it’s own parameters, and there is not much to go on in your paragraph, friend.

https://community.home-assistant.io/t/how-to-help-us-help-you-or-how-to-ask-a-good-question.

Hi @Sir_Goodenough , it was more general question and I hoped my description would be sufficient. Anyway thank you.

HA actually do assumed state on many entities, so making a template switch with an on and off script should make it act like you want.

@WallyR This is great hint, thank you! I ended with using input.boolean switched “on” by button press within script and independent automation waiting for entity change and switching “off” other input.booleans. Thanks to this when button is pressed state gets “on” immediately, after entity change is confirmed other button is switched “off” - this displays “transition” delay comprehensible.