Normally, if it’s an entity in the trigger, I’d have no issues referencing it in the notification message using ‘trigger.to_state’. However, because I’m using ‘time_pattern’ I’ve had to move the entity check into the condition portion of the automation.
- alias: 'Lo Temp ALARM!'
mode: restart
description: ''
trigger:
- platform: time_pattern
minutes: '/15'
condition:
- condition: numeric_state
entity_id: sensor.reef_temperature_f
below: '77'
# for: 00:05:00
action:
- service: notify.mobile_app_iphone12
data:
title: 'ALARM! Reef Temp < 25°C / 77°F'
message: "Temp now is [HOW TO REFERENCE sensor.reef_temperature_f HERE], go get the backup heater!"
Seems somewhat backwards in terms of layman’s logic, but the time interval to me should be the condition, and the temperature threshold should be the trigger. Either way, everythign in this automation works as expected, just looking for the actual temp to be referenced in the message. Help with that bit of code would be appreciated.
If there’s a better/different way to do this automation, I wouldn’t mind changing it up so that it makes more sense.
I’m trying to achieve just what this topic title says but mine is a multiple OR condition. Can this be achieved with a template? I know it’s possible with trigger data but I can’t find how to reference a condition?