forked from timroemisch/mqtt-s7-connector
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.example.yaml
133 lines (123 loc) · 2.95 KB
/
config.example.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
133
# $schema: ./config_schema.yaml
---
update_time: 10000
temperature_interval: 900000
mqtt_base: s7
mqtt_device_name: plc_number1
retain_messages: true
discovery_prefix: homeassistant
discovery_retain: false
plc:
port: 102
host: 192.168.2.10
rack: 0
slot: 2
debug: false
mqtt:
host: mqtts://host.com:1234
user: u
password: p
rejectUnauthorized: true
devices:
- name: Dimmable Light
type: light
state: DB56,X150.0
brightness: DB56,BYTE151
- name: Light
type: light
state: DB56,X150.0
device_name: Dimmer number 1
- name: Climate
type: climate
state: DB56,X150.0
current_temperature: DB51,REAL216
target_temperature: DB56,REAL6
- name: Cover
type: cover
targetPosition: DB56,BYTE39
currentPosition: DB35,BYTE274
currentTiltAngle: DB35,BYTE275
tiltAngle: DB56,BYTE40
trigger: DB56,X41.0
device_name: Window roof number 1
- name: Binary Cover
type: binarycover
currentPosition: DB56,X0.3
targetPosition: DB56,X0.1
- name: Garage
type: binarycover
currentPosition: DB56,X0.3
- name: Binary Sensor
type: sensor
state: DB56,X150.0
- name: Number Sensor
type: sensor
state: DB56,BYTE39
- name: Floating Point Sensor
type: sensor
state: DB51,REAL216
- name: Switch
type: switch
state: DB56,X150.0
- name: Light Readonly Interval
type: light
state:
plc: DB56,X150.0
rw: r
update_interval: 5000
- name: Switch Write only
type: switch
state:
plc: DB56,X150.0
rw: w
- name: User defined mqtt topic name
type: sensor
mqtt: outside-sensor
state: DB56,X150.0
- name: Sensor with unit of measurement
type: sensor
state:
plc: DB56,X150.0
unit_of_measurement: km/h
- name: Sensor with unit of measurement
type: sensor
state:
plc: DB56,X150.0
unit_of_measurement: km/h
- name: Switch with different RW address
type: switch
state:
plc: DB56,X150.0
set_plc: DB56,X150.1
# Example of a device with two entities
- device_name: DevTest Sensor 1
name: Temperatur
manufacturer: Psi-Systems
type: sensor
state: DB4,INT48
unit_of_measurement: "°C"
value_template: "{{ (value | float / 10) | round(2) }}"
device_class: temperature
- device_name: DevTest Sensor 1
name: Humidity
type: sensor
state: DB4,INT50
unit_of_measurement: "%"
value_template: "{{ (value | float / 10) | round(2) }}"
device_class: humidity
# Example of a device with one entity
- device_name: DevTest Sensor 2
name: Temperatur
manufacturer: Psi-Systems
type: sensor
state: DB4,INT48
unit_of_measurement: "°C"
value_template: "{{ (value | float / 10) | round(2) }}"
device_class: temperature
- device_name: DevTest Sensor 1
name: Humidity
type: sensor
state: DB4,INT50
unit_of_measurement: "%"
value_template: "{{ (value | float / 10) | round(2) }}"
device_class: humidity