I have created a couple of simple automations to open blinds at sunrise, and close at sunset and tried to make a set of buttons to run the preset states of the blinds, but they don’t work as expected. I can go to automations and click “run actions” what I ended up with was buttons that enable or disable the automation. I poked around at the options in the card, but couldn’t find run action. Is it not possible, or am I missing something obvious?
What you need is a script
An automation is triggered by something like a state change or a time
But you like to run just some steps with a button
For this a script would be the best
any chance you could provide an example script for “run actions for automation”?
A script is nothing else then an automation without the trigger
Paste your automation herr
ok, that worked! took a bit of experimenting but just found the correct combination. Simple scripts that point to the open and close automations, and point the card at the script. The key to making it work in the card was to select toggle under tap behavior optional Thanks for pointing me in the right direction!
automation to open blinds at sunrise and set tilt based on temperature forecast. more direct sun in the winter and less direct sun in the summer.
alias: Blinds Open in the Morning
description: ""
triggers:
- trigger: sun
event: sunrise
offset: "30"
conditions: []
actions:
- if:
- condition: numeric_state
entity_id: weather.forecast_route_bb_meteorologisk_weather
attribute: temperature
below: 75
then:
- device_id: 2173c11ff8c99593256aaf1fbe5b2ec9
domain: cover
entity_id: 0c0fe1e0f6011cc493945db51f712a40
type: set_tilt_position
position: 25
else:
- if:
- condition: numeric_state
entity_id: weather.forecast_route_bb_meteorologisk_weather
attribute: temperature
above: 74
then:
- device_id: 2173c11ff8c99593256aaf1fbe5b2ec9
domain: cover
entity_id: 0c0fe1e0f6011cc493945db51f712a40
type: set_tilt_position
position: 75
mode: single
script to run with dashboard button
sequence:
- action: automation.trigger
metadata: {}
data:
skip_condition: true
target:
entity_id: automation.open_blinds_in_the_morning
alias: Blinds Open Bedroom Button
description: ""
then a simpler automation and script to close at sunset regardless of temperature.