In Home Assistant, you have “Actions” under “Development Tools.”
If I want to reset a meter at the push of a button, for example, how do I do that?
The same thing happens with my gas meter, which sometimes needs to be adjusted.
Can anyone help me with that?
How do I add an “Action” to the dashboard?
You can create script that will run an action, but usually scripts are used to combine two or more actions into single one and add it to dashboard like any other entity.
Probably you can create helper that will run action and add that entity to dash.
In the card Config, select “Perform Action” in the “Tap Behaviour”* field (note that for the Tile card, this is hidden under “Interactions”)
Add the action you would normally use in Developer tools in the “Action” field.
Hit Save
*EDIT: I suggest you set the Tap Behaviour to None and use Hold Behaviour instead. This will avoid situations where clicking the card unintentionally causes a reset of your meter.
The Bedtime Button is an Input_Button that I send to HomeKit. Pressing that button runs the Lighting.Sleep and Climate.5a.Sleep scripts (but they’re listed individually there, as there are times I just want to trigger one or the other).
If another situation arises where some event or state should trigger one of the scripts to run (as opposed to manually activated), you’d put that script into an automation.
When I need to perform actions that are usually one-off or manual actions, I usually make a script which will perform the action that I want, and then I make that script appear as a tile or mushroom entity card in my dashboard.
That way, when I tap the entity, what happens can be defined. I could tell it to show me a dialogue, like more info dialogue with a massive Play button to trigger the action, or I could have the script run directly from the button tap.
The advantage of doing it with a script is that you can call the script using voice if you expose the script to your voice assistant pipeline. You can even have parameters (fields) that appear in the more info window for you to fill in, and that the voice assistant can fill in for you when you make that request by voice.