Configuration.yaml:
modbus:
- name: modbus_hub
type: rtuovertcp
host: <RS485 to Eth ip>
port: 8888
delay: 0
message_wait_milliseconds: 30
timeout: 5
sensors:
- address: 201
name: "H23 info"
device_address: 1
count: 25
scan_interval: 15
data_type: custom
structure: ">25h"
- address: 283
name: "H23 info floor"
device_address: 1
count: 5
scan_interval: 60
data_type: custom
structure: ">5h"
template:
sensor:
- name: "H23 Ulkolämpötila"
unique_id: h23_201
unit_of_measurement: °C
state_class: measurement
device_class: temperature
state: "{{ (states('sensor.h23_info').split(',')[0]|float * 0.1) }}"
- name: "H23 L1 Menovesi"
unique_id: h23_203
unit_of_measurement: °C
state_class: measurement
device_class: temperature
state: "{{ (states('sensor.h23_info').split(',')[2]|float * 0.1) }}"
- name: "H23 L1 Paluuvesi"
unique_id: h23_205
unit_of_measurement: °C
state_class: measurement
device_class: temperature
state: "{{ (states('sensor.h23_info').split(',')[4]|float * 0.1) }}"
- name: "H23 Kaukolämpö tulo"
unique_id: h23_207
unit_of_measurement: °C
state_class: measurement
device_class: temperature
state: "{{ (states('sensor.h23_info').split(',')[6]|float * 0.1) }}"
- name: "H23 Kaukolämpö paluu"
unique_id: h23_213
unit_of_measurement: °C
state_class: measurement
device_class: temperature
state: "{{ (states('sensor.h23_info').split(',')[12]|float * 0.1) }}"
- name: "H23 LV Menovesi"
unique_id: h23_215
unit_of_measurement: °C
state_class: measurement
device_class: temperature
state: "{{ (states('sensor.h23_info').split(',')[14]|float * 0.1) }}"
- name: "H23 LV Kiertovesi"
unique_id: h23_217
unit_of_measurement: °C
state_class: measurement
device_class: temperature
state: "{{ (states('sensor.h23_info').split(',')[16]|float * 0.1) }}"
- name: "H23 L1 Säädön ulostulo"
unique_id: h23_283
unit_of_measurement: "%"
state_class: measurement
state: "{{ (states('sensor.h23_info_floor').split(',')[0]|float) }}"
- name: "H23 L1 Laskennallinen menoveden asetusarvo"
unique_id: h23_285
unit_of_measurement: °C
state_class: measurement
device_class: temperature
state: "{{ (states('sensor.h23_info_floor').split(',')[2]|float * 0.1) }}"
- name: "H23 L1 Käyrän mukaan"
unique_id: h23_287
unit_of_measurement: °C
state_class: measurement
device_class: temperature
state: "{{ (states('sensor.h23_info_floor').split(',')[4]|float * 0.1) }}"