/
my_wirenboard_to_homeassistant.yaml
95 lines (76 loc) · 2.74 KB
/
my_wirenboard_to_homeassistant.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
broker_to_client:
#########################################################################
# floor
- topic: ^/devices/floor_controls/controls/([^/]*)/meta/type$
template: /homeassistant/switch/{{.f1}}/config
val_map:
switch: >-
{
"command_topic":"/floor/{{.f1}}/state",
"state_topic":"/floor/{{.f1}}/state",
"name":"floor {{.f1}}",
"retain":"true"
}
- topic: ^/devices/floor_controls/controls/([^/]*)$
template: /floor/{{.f1}}/state
val_map: {0: OFF, 1: ON}
# floor temp
- topic: ^/devices/wb-w1/controls/28-8000001f1806/meta/type$
template: /homeassistant/sensor/floor_temperature/config
val_map:
temperature: >-
{
"state_topic":"/floor/{{.f1}}/state",
"name":"floor {{.f1}}",
"retain":"true"
}
- topic: ^/devices/wb-w1/controls/28-8000001f1806$
template: /floor/temperature
#########################################################################
# light
- topic: ^/devices/wb-gpio/controls/LIGHT_([^/]*)/meta/type$
template: /homeassistant/light/{{.f1}}/config
val_map:
switch: >-
{
"command_topic":"/light/{{.f1}}/state",
"state_topic":"/light/{{.f1}}/state",
"name":"{{.f1}}"
}
- topic: ^/devices/wb-gpio/controls/LIGHT_([^/]*)$
template: /light/{{.f1}}/state
val_map: {0: OFF, 1: ON}
#########################################################################
# heaters
- topic: ^/devices/xiaomi/controls/t_([^/]*)_temperature/meta/type$
template: /homeassistant/climate/{{.f1}}/config
val_map:
value: >-
{
"temperature_command_topic":"/climate/{{.f1}}/target_temp",
"temperature_state_topic":"/climate/{{.f1}}/target_temp",
"current_temperature_topic":"/climate/{{.f1}}/temp",
"mode_state_topic":"/climate/{{.f1}}/mode_state_topic",
"mode_command_topic":"/none",
"name":"{{.f1}}",
"modes":["heat","off"],
"max_temp":30,
"min_temp":10,
"retain":"true"
}
- topic: ^/devices/xiaomi/controls/t_([^/]*)_temperature$
template: /climate/{{.f1}}/temp
- topic: ^/devices/climate_controls/controls/([^/]*)$
template: /climate/{{.f1}}/target_temp
- topic: ^/devices/climate_heater_state/controls/([^/]*)$
template: /climate/{{.f1}}/mode_state_topic
val_map: {0: off, 1: heat}
client_to_broker:
- topic: ^/floor/([^/]*)/state$
template: /devices/floor_controls/controls/{{.f1}}/on
val_map: {OFF: 0, ON: 1}
- topic: ^/light/([^/]*)/state$
template: /devices/wb-gpio/controls/LIGHT_{{.f1}}/on
val_map: {OFF: 0, ON: 1}
- topic: ^/climate/([^/]*)/target_temp$
template: /devices/climate_controls/controls/{{.f1}}/on