-
Notifications
You must be signed in to change notification settings - Fork 6
/
sensor.yaml
132 lines (128 loc) · 4.4 KB
/
sensor.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
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
### Network ###
# - platform: pi_hole
# host: localhost:4865
# location: ""
# monitored_conditions:
# - ads_blocked_today
# - ads_percentage_today
# - dns_queries_today
- platform: systemmonitor
resources:
- type: disk_use_percent
arg: /
- type: disk_use
arg: /
- type: disk_free
arg: /
- type: memory_use
- type: memory_free
- type: processor_use
- type: last_boot
- type: network_in
arg: eth0
- type: network_out
arg: eth0
- type: ipv4_address
arg: eth0
- type: load_1m
- type: load_5m
- type: load_15m
- platform: template
sensors:
living_motion_all:
friendly_name: "Living Room Motion"
icon_template: >-
{% if is_state('binary_sensor.living_room_motion_motion', 'on') %}
mdi:run
{% else %}
mdi:walk
{% endif %}
value_template: >-
{% if is_state('binary_sensor.living_room_motion_motion', 'on') %}
active
{% else %}
inactive
{% endif %}
- platform: template
sensors:
bedroom_motion_all:
friendly_name: "Bedroom Motion All"
icon_template: >-
{% if is_state('binary_sensor.bedroom_motion_motion', 'on') or is_state('binary_sensor.bedroom_multi_sensor_motion', 'on') %}
mdi:run
{% else %}
mdi:walk
{% endif %}
value_template: >-
{% if is_state('binary_sensor.bedroom_motion_motion', 'on') or is_state('binary_sensor.bedroom_multi_sensor_motion', 'on') %}
active
{% else %}
inactive
{% endif %}
- platform: template
sensors:
bathroom_motion_all:
friendly_name: "Bathroom Motion All"
icon_template: >-
{% if is_state('binary_sensor.bathroom_motion_motion', 'on') or is_state('binary_sensor.shower_motion_motion', 'on') %}
mdi:run
{% else %}
mdi:walk
{% endif %}
value_template: >-
{% if is_state('binary_sensor.bathroom_motion_motion', 'on') or is_state('binary_sensor.shower_motion_motion', 'on') %}
active
{% else %}
inactive
{% endif %}
- platform: template
sensors:
litter_box:
value_template: >-
{% if states.binary_sensor.litter_box_2_contact_2.state == 'on' %}
Open
{% elif states.binary_sensor.litter_box_2_contact_2.state == 'off' %}
Closed
{% else %}
Failed
{% endif %}
icon_template: >-
{% if states.binary_sensor.litter_box_2_contact_2.state == 'on' %}
mdi:delete
{% elif states.binary_sensor.litter_box_2_contact_2.state == 'off' %}
mdi:cat
{% endif %}
whole_fridge:
value_template: >-
{% if states.binary_sensor.fridge_contact.state == 'on' and states.binary_sensor.freezer_contact.state == 'off' %}
Fridge Open
{% elif states.binary_sensor.fridge_contact.state == 'off' and states.binary_sensor.freezer_contact.state == 'on' %}
Freezer Open
{% elif states.binary_sensor.fridge_contact.state == 'off' and states.binary_sensor.freezer_contact.state == 'off' %}
Closed
{% elif states.binary_sensor.fridge_contact.state == 'on' and states.binary_sensor.freezer_contact.state == 'on' %}
Open
{% endif %}
icon_template: >-
{% if states.binary_sensor.fridge_contact.state == 'on' and states.binary_sensor.freezer_contact.state == 'off' %}
mdi:fridge-bottom
{% elif states.binary_sensor.fridge_contact.state == 'off' and states.binary_sensor.freezer_contact.state == 'on' %}
mdi:fridge-top
{% elif states.binary_sensor.fridge_contact.state == 'off' and states.binary_sensor.freezer_contact.state == 'off' %}
mdi:fridge
{% elif states.binary_sensor.fridge_contact.state == 'on' and states.binary_sensor.freezer_contact.state == 'on' %}
mdi:fridge-outline
{% endif %}
- platform: command_line
name: CPU Temperature
command: "cat /sys/class/thermal/thermal_zone0/temp"
unit_of_measurement: "°C"
value_template: '{{ value | multiply(0.001) | round(1) }}'
- platform: rest
name: "HASS Current Version"
resource: https://pypi.python.org/pypi/homeassistant/json
value_template: '{{ value_json.info.version }}'
scan_interval: 3600
- platform: command_line
name: "HASS Installed version"
command: "head -5 /config/.HA_VERSION"