HI all.
I have a problem with a service input_boolean.turn_on
and input_boolean.turn_off
in automation.
This is my automation.
alias: IrrigazionePy
description: ""
trigger:
- platform: time
at: input_datetime.zone1_time1_starttime
id: startTime1
- platform: time
at: input_datetime.zone1_time2_starttime
id: startTime2
- platform: time
at: input_datetime.zone1_time3_starttime
id: startTime3
- platform: time
at: input_datetime.zone1_time4_starttime
id: startTime4
action:
- choose:
- conditions:
- condition: trigger
id: startTime1
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.zone1_time1_go
- conditions:
- condition: trigger
id: startTime2
sequence:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.zone1_time2_go
data: {}
- conditions:
- condition: trigger
id: startTime3
sequence:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.zone1_time3_go
data: {}
- conditions:
- condition: trigger
id: startTime4
sequence:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.zone1_time4_go
data: {}
- service: python_script.irrigation
data_template:
trigger: "{{ trigger.entity_id }}"
- choose:
- conditions:
- condition: trigger
id: startTime1
sequence:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.zone1_time1_go
data: {}
- conditions:
- condition: trigger
id: startTime2
sequence:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.zone1_time2_go
data: {}
- conditions:
- condition: trigger
id: startTime3
sequence:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.zone1_time3_go
data: {}
- conditions:
- condition: trigger
id: startTime4
sequence:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.zone1_time4_go
data: {}
mode: single
The flow working fine but this action not work
- service: input_boolean.turn_off #(or turn_on)
data: {}
target:
entity_id: input_boolean.zone1_time1_go
In the automation trace I have this response
Result:
params:
domain: input_boolean
service: turn_off
service_data: {}
target:
entity_id:
- input_boolean.zone1_time1_go
running_script: false
limit: 10
If I use this instruction in a script, working fine.
Where am i wrong?
Regards,
Marco