-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathhomeassistant_example.yml
More file actions
78 lines (69 loc) · 2.33 KB
/
homeassistant_example.yml
File metadata and controls
78 lines (69 loc) · 2.33 KB
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
# Sensors from status endpoint
rest:
- resource: http://YOUR.DEVICE.IP.HERE/api/status
scan_interval: 30
sensor:
- name: "CYDSM Temperature"
unique_id: cydsm_temperature
value_template: "{{ value_json.temperature }}"
unit_of_measurement: "°C"
device_class: temperature
state_class: measurement
- name: "CYDSM Free Memory"
unique_id: cydsm_free_memory
value_template: "{{ value_json.free_heap }}"
unit_of_measurement: "KB"
state_class: measurement
- name: "CYDSM WiFi Signal"
unique_id: cydsm_wifi_signal
value_template: "{{ value_json.wifi_strength }}"
unit_of_measurement: "dBm"
device_class: signal_strength
state_class: measurement
- name: "CYDSM Uptime"
unique_id: cydsm_uptime
value_template: "{{ value_json.uptime }}"
unit_of_measurement: "s"
state_class: measurement
# Binary sensors
binary_sensor:
- platform: rest
name: "CYDSM Dark Mode"
unique_id: cydsm_dark_mode
resource: http://YOUR.DEVICE.IP.HERE/api/status
value_template: "{{ value_json.dark_mode }}"
device_class: "running"
- platform: rest
name: "CYDSM Display State"
unique_id: cydsm_display
resource: http://YOUR.DEVICE.IP.HERE/api/status
value_template: "{{ value_json.display }}"
device_class: "light"
# Switches for controlling the device
switch:
- platform: rest
name: "CYDSM Dark Mode Toggle"
unique_id: cydsm_dark_mode_switch
resource: http://YOUR.DEVICE.IP.HERE/api/command
body_on: '{"dark_mode": true}'
body_off: '{"dark_mode": false}'
is_on_template: "{{ value_json.dark_mode }}"
state_resource: http://YOUR.DEVICE.IP.HERE/api/status
- platform: rest
name: "CYDSM Display Toggle"
unique_id: cydsm_display_switch
resource: http://YOUR.DEVICE.IP.HERE/api/command
body_on: '{"display": true}'
body_off: '{"display": false}'
is_on_template: "{{ value_json.display }}"
state_resource: http://YOUR.DEVICE.IP.HERE/api/status
# REST Commands for control operations
rest_command:
cydsm_restart:
url: http://YOUR.DEVICE.IP.HERE/api/command
method: POST
payload: '{"restart": true}'
cydsm_reset_theme:
url: http://YOUR.DEVICE.IP.HERE/api/command
method: POST
payload: '{"reset_theme": true}'