I am defining two template sensors to see if either of 2 thermostats setpoints are above a vacation temperature setpoints. The code below runs properly on the DT Template tab, with “True” or “False” results for the individual thermostats and the “OR” of the two, resulting “True” or “False”.
Blockquote
Template Sensor LR and MBR above vacation setpoint
- name: "LR Setpoint Above Vacation"
state: "{{ state_attr('climate.living_room','temperature')|int > states('input_number.vacation_temperature')|int }}"
- name: "MBR Setpoint Above Vacation"
state: "{{ state_attr('climate.bedroom','temperature')|int > states('input_number.vacation_temperature')|int }}"
Either LR or MBR above Vac Temp
- name: "LR or MBR SP Above Vac Temp"
state: >
"{{ states('sensor.mbr_setpoint_above_vacation') == 'True'
or states('sensor.lr_setpoint_above_vacation') == 'True' }}"
I try to create an automation that triggers when the “OR” state goes “True” then send notification. Here is the Yaml code:
Blockquote
alias: Check or Thermostat SP above Vacation SP
description: Notifies if either MBR or LR SP is above Vacatiopn SP
trigger:
- platform: state
entity_id:- sensor.lr_or_mbr_sp_above_vac_temp
to: “"True"”
condition:
action:
- sensor.lr_or_mbr_sp_above_vac_temp
- service: notify.mobile_app_sm_g950u
metadata: {}
data:
message: TTS
data:
ttl: 0
priority: high
media_stream: alarm_stream_max
tts_text: A Thermostat is above Vaction setpoint
mode: single
I have tried the OR result to be True and “True” , neither triggers.
Any advice?
Thanks