-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtemplate-filters.txt
74 lines (68 loc) · 2.26 KB
/
template-filters.txt
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
- sensor:
- unique_id: 'dsh_lastshowerkwh_f'
state: >
{% if states('sensor.dsh_lastshowerkwh') not in ['unavailable','unknown'] %}
{{ states('sensor.dsh_lastshowerkwh') }}
{% else %}
{{ this.state }}
{% endif %}
device_class: energy
unit_of_measurement: "kWh"
- sensor:
- unique_id: 'dsh_lastshowertemp_f'
state: >
{% if states('sensor.dsh_lastshowertemp') not in ['unavailable','unknown'] %}
{{ states('sensor.dsh_lastshowertemp') }}
{% else %}
{{ this.state }}
{% endif %}
device_class: temperature
unit_of_measurement: "°C"
- sensor:
- unique_id: 'dsh_lastdurationseconds_f'
state: >
{% if states('sensor.dsh_lastdurationseconds') not in ['unavailable','unknown'] %}
{{ states('sensor.dsh_lastdurationseconds') }}
{% else %}
{{ this.state }}
{% endif %}
unit_of_measurement: "s"
- sensor:
- unique_id: 'sensor.dsh_lastshowerliter_f'
state: >
{% if states('sensor.dsh_lastshowerliter') not in ['unavailable','unknown'] %}
{{ states('sensor.dsh_lastshowerliter') }}
{% else %}
{{ this.state }}
{% endif %}
device_class: water
unit_of_measurement: "L"
- sensor:
- unique_id: 'dsh_lastshowerm3_f'
state: >
{% if states('sensor.dsh_lastshowerm3') not in ['unavailable','unknown'] %}
{{ states('sensor.dsh_lastshowerm3') }}
{% else %}
{{ this.state }}
{% endif %}
device_class: water
unit_of_measurement: "m³"
- sensor:
- unique_id: 'dsh_lastshowerfinished_f'
state: >
{% if states('sensor.dsh_lastshowerfinished') not in ['unavailable','unknown'] %}
{{ states('sensor.dsh_lastshowerfinished') }}
{% else %}
{{ this.state }}
{% endif %}
icon: 'mdi:timer'
- binary_sensor:
- unique_id: 'dsh_showeroccupied_f'
state: >
{% if states('binary_sensor.dsh_showeroccupied') not in ['unavailable','unknown'] %}
{{ states('binary_sensor.dsh_showeroccupied') }}
{% else %}
{{ this.state }}
{% endif %}
device_class: occupancy
icon: 'mdi:shower-head'