Skip to content

Commit

Permalink
Upgrade to huawei-solar==2.2.0b2
Browse files Browse the repository at this point in the history
  • Loading branch information
wlcrs committed Nov 26, 2022
1 parent 22d9f06 commit cb51a7c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
24 changes: 23 additions & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,28 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:

primary_bridge = None
try:
# Multiple inverters can be connected to each other via a daisy chain,
# via an internal modbus-network (ie. not the same modbus network that we are
# using to talk to the inverter).
#
# Each inverter receives it's own 'slave id' in that case.
# The inverter that we use as 'gateway' will then forward the request to
# the proper inverter.

# ┌─────────────┐
# │ EXTERNAL │
# │ APPLICATION │
# └──────┬──────┘
# │
# ┌────┴────┐
# │PRIMARY │
# │INVERTER │
# └────┬────┘
# ┌──────────────┼───────────────┐
# │ │ │
# ┌────┴────┐ ┌───┴─────┐ ┌────┴────┐
# │ SLAVE X │ │ SLAVE Y │ │SLAVE ...│
# └─────────┘ └─────────┘ └─────────┘

if entry.data[CONF_HOST] is None:
primary_bridge = await HuaweiSolarBridge.create_rtu(
Expand Down Expand Up @@ -208,7 +230,7 @@ async def _compute_device_infos(
name="Inverter",
manufacturer="Huawei",
model=bridge.model_name,
via_device=connecting_inverter_device_id, # type: ignore
via_device=connecting_inverter_device_id, # type: ignore[typeddict-item]
)

# Add power meter device if a power meter is detected
Expand Down
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/huawei_solar",
"issue_tracker": "https://github.com/wlcrs/huawei_solar/issues",
"requirements": ["huawei-solar==2.1.6"],
"requirements": ["huawei-solar==2.2.0b2"],
"codeowners": ["@wlcrs"],
"iot_class": "local_polling",
"version": "1.1.6",
"version": "1.2.0b1",
"loggers": ["huawei_solar", "pymodbus"]
}

0 comments on commit cb51a7c

Please sign in to comment.