-
-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Hi,
Thanks for the work on this integration. I've just recently swapped over to this new integration instead of the older version and just wanted to check I was doing the Predbat integration correctly.
For predbat to talk to the system it is making use of modbus.write_register
which worked fine with the old integration. With the new integration Home Assistant knows nothing of modbus
and so to get it to work I had to add the following to my configuration.yaml:
modbus:
- name: Sigen
type: tcp
host: 192.168.0.167
port: 502
switches:
- name: DummySwitch
address: 13
write_type: coil
Obviously this integration is already using modbus in the background so I shouldn't in theory have needed to add that entry to my configuration.yaml. What is the method to actually talk to the battery using the new integration.
This is part of the current code that is being used by Predbat from their docs that was mainly aimed at the old integration:
- id: "automation_sigen_ess_max_discharging_limit_input_number_action"
alias: "sigen ESS max discharging limit input number action"
description: "Sigen ESS max discharging limit action for batpred"
triggers:
- trigger: state
entity_id: input_number.discharge_rate
action:
- action: modbus.write_register
data_template:
hub: Sigen
slave: 247
address: 40034
value:
- >-
0
- >-
{{ states('input_number.discharge_rate') |
round(0) | int }}
mode: single
Without the modbus entry in to configuration.yaml, there is a home assistant log entry that modbus doesn't exist.