Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 107139

Using Hue temperature sensor value in an automation

$
0
0

I have a Hue external motion sensor which has a temperature sensor.

I have an automation which is basically
When time = 07:00
if temp < 5 then send a notification to my iPhone

Here is the YAML and it works.

alias: Temp msg for phone
description: ''
trigger:
  - platform: time
    at: '07:00'
condition:
  - type: is_temperature
    condition: device
    device_id: 85a46df9f51c0065ba45df0f1bb220c2
    entity_id: sensor.hue_outdoor_motion_sensor_1_temperature
    domain: sensor
    below: 10
action:
  - service: notify.mobile_app_rix_iphone11
    data:
      message: Below 5 degrees
      title: Outside temp
mode: single

I know that the sensor reports its actual temperature to HA so I was wondering if I could modify the automation it so that the Notification message included the measured/actual temperature.

I found a similar automation here
https://community.home-assistant.io/t/notify-when-temperature-crosses-specific-value/92893
with an answer by anon43302295
So I modified the YAML as shown below.
Unfortunately it doesn’t work and I cannot figure out why.
Any suggestions gratefully received
Thank you.

alias: Temp msg for phone
# https://community.home-assistant.io/t/notify-when-temperature-crosses-specific-value/92893
description: ''
trigger:
  - platform: time
    at: '19:03'
condition:
  - type: is_temperature
    condition: device
    device_id: 85a46df9f51c0065ba45df0f1bb220c2
    entity_id: sensor.hue_outdoor_motion_sensor_1_temperature
    domain: sensor
    below: 10
action:
  - service: notify.mobile_app_rix_iphone11
    data_template:
      message: {{ states('sensor.hue_outdoor_motion_sensor_1_temperature') }}
      title: Outside temp
mode: single

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 107139

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>