Hello,
I’m trying to make a script to water my garden based on the irrigation unlimited HACS integration. This is just to put you in context.
In this integration I have a binary sensor called binary_sensor.irrigation_unlimited_c1_z1 with the next attributes:
index: 0
enabled: false
status: disabled
schedule_count: 1
schedules: ''
adjustment: None
current_schedule: not running
percent_complete: 0
next_schedule: 1
next_name: Primavera
next_start: '2021-03-02T08:50:00+01:00'
next_duration: '0:05:00'
today_total: 14.4
friendly_name: Zona 1
icon: 'mdi:circle-off-outline'
I have created a script, and I want to make some actions if the enabled property is true or false, but I don’t know why, the actions are never executed regardless the state of the ‘enabled’ property.
The script is this:
alias: 'test'
sequence:
- service: notify.telegram_notifier
data:
message: before
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.irrigation_unlimited_c1_m
attribute: enabled
state: 'false'
sequence:
- service: notify.telegram_notifier
data:
message: inside
default: []
- service: notify.telegram_notifier
data:
message: after
I get in my mobile:
before
after
but never the ‘inside’ message.
Any help will be welcomed.