-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathmodbus_configuration.yaml
61 lines (61 loc) · 1.38 KB
/
modbus_configuration.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
modbus:
- name: "remoteIO"
type: tcp
host: 192.168.1.220
port: 502
lights:
- name: "Output 1"
slave: 1
address: 0
scan_interval: 5
write_type: coil
verify:
- name: "Output 3"
slave: 1
address: 2
scan_interval: 5
write_type: coil
verify:
fans:
- name: "Output 2"
slave: 1
address: 1
scan_interval: 5
write_type: coil
verify:
switches:
- name: "Output 4"
slave: 1
address: 3
scan_interval: 5
write_type: coil
verify:
sensors:
- name: "Raw value"
slave: 1
address: 0
input_type: input
- name: "Modbus Humidity"
slave: 50
address: 0
input_type: input
device_class: humidity
precision: 1
scale: 0.1
count: 1
unit_of_measurement: '%'
- name: "Modbus Temperature"
slave: 50
address: 1
input_type: input
count: 1
device_class: temperature
precision: 1
scale: 0.1
unit_of_measurement: C
template:
sensor:
- name: "Water tank"
device_class: volume
unit_of_measurement: L
state: "{{ 0+((300-0)/(4000-1000))*(states('sensor.raw_value')|int(0)-1000) }}"