Hello everyone,
I have a bunch of Shelly devices that tend to run hot and sometimes then shut down.
I created a template sensor that lists all Shellys that exceed 85 °C
template:
- sensor:
- name: Shelly High Temperature
state: >
{% set ns = namespace(list=[]) %}
{% for item in states.sensor
| selectattr('entity_id', 'contains', 'analog_temperature')
| selectattr("state", 'is_number')
%}
{% if item.state | float > 85 %}
{% set ns.list = ns.list + [ item.entity_id ] %}
{% endif %}
{% endfor %}
{{ ns.list | to_json }}
I then created an automation to notify me.
automation:
- alias: Shelly High Temperature
id: shelly_high_temperature
description: ''
mode: parallel
triggers:
- trigger: state
entity_id:
- sensor.shelly_high_temperature
conditions:
- and:
- condition: template
value_template: "{{ trigger.to_state.state | from_json | count > trigger.from_state.state | from_json | count }}"
actions:
- action: notify.mobile_app_sm_g975f
data:
message: "Warning! Temperature of {{ trigger.to_state.state | from_json | reject('in', trigger.from_state.state) | join }} high"
I would like to modify the automation so it notifies me when a Shelly exceeds 85 °C (stating the actual temperature it measures) and then again, when/if the temperature exceeds 90 °C.
Does anybody know how to do this without creating additional sensor+automation pairs?
Thank you
Alex