I have hits modbus configuration
modbus:
- name: victron
host: 192.168.3.225 #ip from raspberry PI victron gx
type: tcp
port: 502
sensors:
- name: "Smartsolar Battery Current"
scan_interval: 10
unit_of_measurement: "A"
slave: 237
address: 772
data_type: int16
scale: 0.1
#precision: 2
device_class: current
- name: "temp_SCS"
scan_interval: 10
slave: 237
address: 775
And this template
template:
- sensor:
- name: "Smartsolar_Charger_State_v2"
value_template: >-
{% if is_state('sensor.temp_SCS', '0') %}
Off
{% elif is_state('sensor.temp_SCS', '3') %}
Bulk
{% elif is_state('sensor.temp_SCS', '2') %}
Fault
{% elif is_state('sensor.temp_SCS', '4') %}
Absorbtion
{% elif is_state('sensor.temp_SCS', '5') %}
Float
{% elif is_state('sensor.temp_SCS', '6') %}
Storage
{% elif is_state('sensor.temp_SCS', '7') %}
Equalize
{% elif is_state('sensor.temp_SCS', '11') %}
Other (Hub-1)
{% elif is_state('sensor.temp_SCS', '252') %}
External Control
{% else %}
N/A
{% endif %}
When I check the config it looks ok. Also the template looks to work in the template checker