Using the "button" entity.
Hi!
I want to use the button type entity and when I implement it I get a date instead of the "PRESS" button. I use this function to restart the ESPs and I wanted to use the ESP status to indicate the end of the restart instead of setting it in a fixed way.
Thanks and good job.
Would you mind sharing the configuration you have / a screenshot? This sounds like an interesting use case of the card, but I'm struggling to understand what exactly the card is counting down to in your setup. If there's a good use for the buttons with this card, I'm happy to add some special logic to show the PRESS button instead of the date.
You're not scheduling restarts of the ESP, are you?
Hello:
I'll start by answering the last question. No, I am not scheduled to reset the device with ESPHome. I simply have a button to restart it in a controlled way when I press it. In the ESPHome I have the following code:
button:
- platform: restart
name: "${device_normal_name} Restart"
The card I currently use is the following:
entity: button.mini32_restart
When I press the "PRESS" button it is disabled while the device is restarting and when it is operational again it is enabled. The ESPHome reset takes about 6 seconds, at which point the "PRESS" button becomes active again.
Currently what I have done to solve it is create a script that restarts the ESPHome device ("script.mini32_restart") and I have created a card with your plugin that calls the script in a timed manner. I copy the code I use from your plugin:
entity: script.mini32_restart
type: custom:timer-bar-card
icon: mdi:restart
duration:
fixed: "0:00:08"
tap_action:
action: toggle
debug: false
If you need a "video" in GIF format with both buttons, tell me and I'll try to do it somehow.
Thanks and good job. I hope you can help me avoid having to use a script and make the call directly to the device with ESPHome.