/
templates.yaml
31 lines (30 loc) · 981 Bytes
/
templates.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Binary Sensors
- binary_sensor:
- name: "Washing Machine"
unique_id: binary_sensor.washing_machine
icon: mdi:washing-machine
device_class: running
delay_off:
minutes: 10
state: >
{% if is_state('sensor.washing_machine_energy_power', 'unavailable') %}
off
{% else %}
{{ states('sensor.washing_machine_energy_power')|float > 3 }}
{% endif %}
- name: "Air Quailty Unhealthy"
unique_id: binary_sensor.air_quaility_unhealthy
state: >
{% if is_state('sensor.airnow_aqi', 'unavailable') %}
off
{% else %}
{{states('sensor.airnow_aqi')|float > 149}}
{% endif %}
# Sensors
- sensor:
- name: "Family Room Temperature"
unique_id: sensor.family_room_temperature
state: "{{ state_attr('climate.family_room_thermostat', 'current_temperature') }}"
unit_of_measurement: "°F"
state_class: measurement
device_class: temperature