Created
January 1, 2021 19:15
-
-
Save Didgeridrew/31d77f5f0c5b3f0666708947f32671f8 to your computer and use it in GitHub Desktop.
HA template sensor and automation help
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
binary_sensor: | |
- platform: template | |
sensors: | |
gatos_aviso_binary: | |
friendly_name: "Gatos Suelo Binary Sensor" | |
value_template: >- | |
{% if states('sensor.temperature_gatos_suelo') == 'unknown' | |
or states('sensor.temperature_gatos_suelo') == 'unavailable' | |
or (utcnow() - states.sensor.temperature_gatos_suelo.last_updated).total_seconds() | round(0) > 60 %} | |
off | |
{% else %} | |
on | |
{%endif%} | |
- id: gatos_aviso | |
alias: Gatos aviso sensor suelo no actualiza | |
description: '' | |
trigger: | |
- platform: state | |
entity_id: binary_sensor.gatos_aviso_binary | |
to: 'off' | |
for: 30 min | |
condition: [] | |
action: | |
- service: notify.mobile_app_mi_9t_pro | |
data: | |
title: Atencíon | |
message: Sensor Gatos suelo no actualiza desde hace a menos media hora | |
mode: single |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment