diff --git a/modbus_sungrow.yaml b/modbus_sungrow.yaml index 4f4d4d0..7b7b079 100644 --- a/modbus_sungrow.yaml +++ b/modbus_sungrow.yaml @@ -1,7 +1,7 @@ # Home Assistant Sungrow inverter integration # https://github.com/mkaiser/Sungrow-SHx-Inverter-Modbus-Home-Assistant # by Martin Kaiser -# last update: 2024-09-16(3) +# last update: 2024-09-21 # # Note: This YAML file will only work with Home Assistant >= 2023.10 @@ -9,9 +9,10 @@ modbus: - name: SungrowSHx type: tcp host: !secret sungrow_modbus_host_ip - port: !secret sungrow_modbus_port + port: !secret sungrow_modbus_port delay: 5 timeout: 10 + sensors: - name: Sungrow inverter serial unique_id: sg_inverter_serial @@ -20,17 +21,17 @@ modbus: input_type: input data_type: string count: 10 - scan_interval: 86400 - -# for Sungrow batteries only -# - name: Sungrow battery serial -# unique_id: sg_battery_serial -# device_address: !secret sbr_modbus_slave # Usually 200, only modbus-port, not via Winet-S -# address: 10710 # reg 10711 -# input_type: input -# data_type: string -# count: 10 -# scan_interval: 86400 + scan_interval: 600 + + # for Sungrow batteries only + # - name: Sungrow battery serial + # unique_id: sg_battery_serial + # device_address: !secret sbr_modbus_slave # Usually 200, only modbus-port, not via Winet-S + # address: 10710 # reg 10711 + # input_type: input + # data_type: string + # count: 10 + # scan_interval: 86400 - name: Sungrow device type code unique_id: sg_dev_code @@ -381,7 +382,7 @@ modbus: scan_interval: 10 # https://www.photovoltaikforum.com/thread/166134-daten-lesen-vom-sungrow-wechselrichtern-modbus/?postID=3324464#post3324464 - - name: Meter phase A voltage + - name: Meter phase A voltage unique_id: sg_meter_phase_a_voltage device_address: !secret sungrow_modbus_slave address: 5740 # reg 5741 @@ -407,7 +408,7 @@ modbus: scale: 0.1 scan_interval: 10 - - name: Meter phase C voltage + - name: Meter phase C voltage unique_id: sg_meter_phase_c_voltage device_address: !secret sungrow_modbus_slave address: 5742 # reg 5743 @@ -420,7 +421,7 @@ modbus: scale: 0.1 scan_interval: 10 - - name: Meter phase A current + - name: Meter phase A current unique_id: sg_meter_phase_a_current device_address: !secret sungrow_modbus_slave address: 5743 # reg 5744 @@ -446,7 +447,7 @@ modbus: scale: 0.01 scan_interval: 10 - - name: Meter phase C current + - name: Meter phase C current unique_id: sg_meter_phase_c_current device_address: !secret sungrow_modbus_slave address: 5745 # reg 5746 @@ -2600,7 +2601,7 @@ automation: entity_id: input_select.set_sg_inverter_run_mode data: option: > - {% if is_state('sensor.sungrow_inverter_state', "Stop") %} + {% if is_state('sensor.sungrow_inverter_state', "Stop") or is_state('sensor.sungrow_inverter_state', "Shutdown") %} Shutdown {% else %} Enabled