Previously I integrated my heat pump with home assistant via WiFi and LGs ThinQ API, in this video we take the home assistant integration to another level with a direct Modbus integration.p.
modbus.yaml
- name: waveshare1
type: tcp
host: xxx.xxx.xxx.xxx
port: 502
delay: 2
timeout: 5
binary_sensors:
- name: "hp_heating_mode"
unique_id: "modbus.hp_heating_mode"
address: 0
scan_interval: 5
slave: 1
input_type: coil
- name: "hp_flow_too_low"
unique_id: "modbus.hp_flow_too_low"
address: 0
scan_interval: 10
slave: 1
input_type: discrete_input
- name: "hp_pump_status"
unique_id: "modbus.hp_pump_status"
address: 1
scan_interval: 10
slave: 1
input_type: discrete_input
- name: "hp_compressor_status"
unique_id: "modbus.hp_compressor_status"
address: 3
scan_interval: 10
slave: 1
input_type: discrete_input
- name: "hp_defrost_status"
unique_id: "modbus.hp_defrost_status"
address: 4
scan_interval: 30
slave: 1
input_type: discrete_input
- name: "hp_dhw_status"
unique_id: "modbus.hp_dhw_status"
address: 5
scan_interval: 10
slave: 1
input_type: discrete_input
- name: "hp_disinfect_status"
unique_id: "modbus.hp_disinfect_status"
address: 6
scan_interval: 60
slave: 1
input_type: discrete_input
- name: "hp_silent_status"
unique_id: "modbus.hp_silent_status"
address: 7
scan_interval: 10
slave: 1
input_type: discrete_input
- name: "hp_error_status"
unique_id: "modbus.hp_error_status"
address: 13
scan_interval: 60
slave: 1
input_type: discrete_input
sensors:
- name: hp_mode
unique_id: "hp_mode"
scan_interval: 10
address: 1
slave: 1
input_type: input
- name: hp_dhw_target_temp
unique_id: "modbus.hp_dhw_target_temp"
scan_interval: 10
address: 8
slave: 1
input_type: holding
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: "°C"
- name: "hp_inlet_temp"
unique_id: "modbus.hp_inlet_temp"
scan_interval: 10
address: 2
slave: 1
input_type: input
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: "°C"
- name: "hp_flow_rate"
unique_id: "modbus.hp_flow_rate"
scan_interval: 10
address: 8
slave: 1
scale: 0.1
precision: 1
input_type: input
unit_of_measurement: "l/min"
- name: "hp_outdoor_air_temp"
unique_id: "modbus.hp_outdoor_air_temp"
scan_interval: 60
address: 12
slave: 1
input_type: input
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: "°C"
switches:
- name: "hp_dhw_mode"
unique_id: "modbus.hp_dhw_mode"
slave: 1
address: 1
write_type: coil
command_on: 1
command_off: 0
verify:
input_type: coil
address: 1
state_on: 1
state_off: 0
- name: "hp_silent_mode"
unique_id: "modbus.hp_silent_mode"
slave: 1
address: 2
write_type: coil
command_on: 1
command_off: 0
verify:
input_type: coil
address: 2
state_on: 1
state_off: 0
climates:
- name: "hp_heating_climate"
unique_id: "modbus.hp_heating_climate"
address: 3
slave: 1
input_type: input
max_temp: 45
min_temp: 15
offset: 0
precision: 1
scale: 0.1
target_temp_register: 2
temp_step: 0.5
temperature_unit: C
hvac_onoff_register: 0
write_registers: true
hvac_mode_register:
address: 0
values:
state_cool: 0
state_heat: 4
state_auto: 3
- name: "hp_water_climate"
unique_id: "modbus.hp_water_climate"
address: 5
slave: 1
input_type: input
max_temp: 55
min_temp: 40
offset: 0
precision: 1
scale: 0.1
target_temp_register: 8
temp_step: 0.5
temperature_unit: C