I am trying to use the timer state (idle or active) in a condition for an automation and it doesn’t seem to be working. The condition always passes as true. Do I have a syntax issue?
- id: shop_timer_test
alias: Shop Timer Test
# Temp above 75 or below 60
trigger:
- platform: numeric_state
entity_id: sensor.shop_multisensor6_temperature
above: 75
- platform: numeric_state
entity_id: sensor.shop_multisensor6_temperature
below: 60
# Ensure alarm isn't already set (idle vs active). This avoids multiple text messages.
condition:
condition: state
entity_id: timer.shop_temp_alarm
state: 'idle'
action:
# Alarm timer is set for 8 hours --> prevents multiple text messages
- service: timer.start
entity_id: timer.shop_temp_alarm
data:
duration: '08:00:00'
# Send text message
- service: notify.text_jeremy
data:
message: 'TEST: Shop Temp Out of Range. Shop temperature is {{ states.sensor.shop_multisensor6_temperature.state }} degrees'