Skip to content

Commit

Permalink
Fix issue #340 (Renamings in FW from "stop" to "shutdown")
Browse files Browse the repository at this point in the history
  • Loading branch information
mkaiser authored Sep 21, 2024
1 parent 14ec064 commit 12b2f40
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions modbus_sungrow.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# 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

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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 12b2f40

Please sign in to comment.