Hello,
First, thank you for Home Assistant and all the resources shared in order to learn and use this amazing project.
I’m using it to help farmers to automate some tasks as irrigation and green house door open/close driven by sensors and buttons.
Basically, things are simple and repeated multiple times. In order to avoid copy/past issue, I’m trying to use blueprint for the automation part.
So I’ve already configured automation manually, and I’m trying to convert it in blueprint. Here is my first automation example :
- id: '1681155631416'
alias: loadTimerPetiteSerre
description: Démarrer le timer avec la liste des temps défini
trigger:
- platform: state
entity_id:
- input_select.ddpetiteserre
condition:
- condition: not
conditions:
- condition: state
entity_id: input_select.ddpetiteserre
state: 'OFF'
action:
- service: switch.turn_on
data: {}
target:
entity_id: switch.irrigation_petite_serre
- service: timer.start
data:
duration: 00:{{ states('input_select.ddpetiteserre') }}:00
target:
entity_id: timer.timerpetiteserre
mode: single
It’s work and start a timer when a value is selected from an input_select.
Now the blueprint conversion :
blueprint:
name: load timer
description: Démarrer le timer avec la liste des temps défini
domain: automation
input:
selectTime:
name: select time
selector:
entity:
domain: input_select
switchEV:
name: switch EV
selector:
entity:
domain: switch
timerEV:
name: timer EV
selector:
entity:
domain: timer
mode: single
trigger:
platform: state
entity_id: !input selectTime
variables:
inpSelectTime: !input selectTime
timerDuration: "{{ states(inpSelectTime) }}"
condition:
condition: not
conditions:
- condition: state
entity_id: !input selectTime
state: 'OFF'
action:
- alias: "Allume l'electronvanne"
service: switch.turn_on
target: !input switchEV
- alias: "lance le timer"
service: timer.start
data:
duration: "00:{{ timeDuration }}:00"
target: !input timerEV
The blueprint is available in the automation settings, so I try to use it but when I want to save it, I get the following error :
I can see the problem come from the data action parameter but I don’t understand what is the problem. I’ve also tryed to add data: {}
for the first action but the issue persist.
Can you help me to understand it ?
Thank you for your support.