Skip to content

Commit 63c2b34

Browse files
committed
Port integration domain to SolisConnect
1 parent 0658f0e commit 63c2b34

82 files changed

Lines changed: 1986 additions & 1986 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ To install SolisConnect, follow these steps:
3030
Whilst the solis inverters do provide total sensors for today, yesterday, month and year. I highly suggest to create a utility meter in HA, as a time difference between HA and Solis might have the values reset before midnight, causing issues in charts.
3131

3232
## Manual Installation
33-
1. Copy the "solis_modbus" folder into your "custom_components" folder
33+
1. Copy the "solisconnect" folder into your "custom_components" folder
3434

3535
## Setup
3636
1. Navigate to Settings -> Devices & Services

‎custom_components/solis_modbus/cloud/__init__.py‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

custom_components/solis_modbus/__init__.py renamed to custom_components/solisconnect/__init__.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ async def service_set_time(call: ServiceCall) -> None:
112112
_LOGGER.debug("Set time for %s to %s", entity_id, new_time)
113113
return
114114

115-
_LOGGER.error("⚠️ Entity with id %s not found in solis_modbus TIME_ENTITIES", entity_id)
115+
_LOGGER.error("⚠️ Entity with id %s not found in solisconnect TIME_ENTITIES", entity_id)
116116

117117
hass.services.async_register(DOMAIN, "solis_write_holding_register", service_write_holding_register, schema=SCHEME_HOLDING_REGISTER)
118118
hass.services.async_register(DOMAIN, "solis_write_time", service_set_time, schema=SCHEME_TIME_SET)
@@ -138,9 +138,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
138138
if not inverter_serial:
139139
pn_create(
140140
hass,
141-
"Solis Modbus: Inverter Serial is missing. Please reconfigure the integration.",
142-
title="Solis Modbus Configuration Issue",
143-
notification_id="solis_modbus_missing_serial",
141+
"SolisConnect: Inverter Serial is missing. Please reconfigure the integration.",
142+
title="SolisConnect Configuration Issue",
143+
notification_id="solisconnect_missing_serial",
144144
)
145145
raise ConfigEntryError("Inverter Serial is missing")
146146
# -----------------------------------------
@@ -189,7 +189,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
189189
else:
190190
connection_id = "soliscloud"
191191

192-
_LOGGER.info(f"Loaded Solis Modbus Integration ({protocol_mode}/{connection_type}) with Model: {config.get('model')}")
192+
_LOGGER.info(f"Loaded SolisConnect Integration ({protocol_mode}/{connection_type}) with Model: {config.get('model')}")
193193

194194
# ... (Config extraction ...) ...
195195
poll_interval_fast = config.get("poll_interval_fast", 5)
@@ -208,9 +208,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
208208
if inverter_template is None:
209209
pn_create(
210210
hass,
211-
"Your Solis Modbus configuration is invalid. Please reconfigure the integration.",
212-
title="Solis Modbus Configuration Issue",
213-
notification_id="solis_modbus_invalid_config",
211+
"Your SolisConnect configuration is invalid. Please reconfigure the integration.",
212+
title="SolisConnect Configuration Issue",
213+
notification_id="solisconnect_invalid_config",
214214
)
215215
raise ConfigEntryError
216216

@@ -505,7 +505,7 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry):
505505
# Unload platforms associated with this integration. SENSOR is forwarded
506506
# in async_setup_entry alongside PLATFORMS, so it must be unloaded here too —
507507
# otherwise a reload leaves the sensor platform set up and the next setup
508-
# fails with "config entry for solis_modbus.sensor has already been setup!".
508+
# fails with "config entry for solisconnect.sensor has already been setup!".
509509
unload_ok = all(await asyncio.gather(*(hass.config_entries.async_forward_entry_unload(entry, platform) for platform in [Platform.SENSOR, *PLATFORMS])))
510510

511511
# Clean up resources

custom_components/solis_modbus/client_manager.py renamed to custom_components/solisconnect/client_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from pymodbus.client import AsyncModbusSerialClient, AsyncModbusTcpClient
66

7-
from custom_components.solis_modbus.const import CONN_TYPE_SERIAL, CONN_TYPE_TCP
7+
from custom_components.solisconnect.const import CONN_TYPE_SERIAL, CONN_TYPE_TCP
88

99
_LOGGER = logging.getLogger(__name__)
1010

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""SolisCloud HTTP API support for the SolisConnect integration."""
File renamed without changes.

custom_components/solis_modbus/cloud/cloud_controller.py renamed to custom_components/solisconnect/cloud/cloud_controller.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
from homeassistant.exceptions import HomeAssistantError
66

7-
from custom_components.solis_modbus.cloud.api_client import SolisCloudApiClient, SolisCloudApiError
8-
from custom_components.solis_modbus.const import DEFAULT_CLOUD_POLL_INTERVAL, MIN_CLOUD_POLL_INTERVAL
9-
from custom_components.solis_modbus.controller_base import SolisControllerBase
10-
from custom_components.solis_modbus.data.enums import PollSpeed
11-
from custom_components.solis_modbus.data.solis_config import InverterConfig
12-
from custom_components.solis_modbus.helpers import cache_save, notify_register_update
13-
from custom_components.solis_modbus.sensor_data.cloud_mapping import (
7+
from custom_components.solisconnect.cloud.api_client import SolisCloudApiClient, SolisCloudApiError
8+
from custom_components.solisconnect.const import DEFAULT_CLOUD_POLL_INTERVAL, MIN_CLOUD_POLL_INTERVAL
9+
from custom_components.solisconnect.controller_base import SolisControllerBase
10+
from custom_components.solisconnect.data.enums import PollSpeed
11+
from custom_components.solisconnect.data.solis_config import InverterConfig
12+
from custom_components.solisconnect.helpers import cache_save, notify_register_update
13+
from custom_components.solisconnect.sensor_data.cloud_mapping import (
1414
REGISTER_TO_CID,
1515
CloudCidMapping,
1616
cid_msg_from_words,

custom_components/solis_modbus/cloud/cloud_retrieval.py renamed to custom_components/solisconnect/cloud/cloud_retrieval.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
from homeassistant.core import HomeAssistant
66
from homeassistant.helpers.event import async_track_time_interval
77

8-
from custom_components.solis_modbus.cloud.api_client import SolisCloudApiError
9-
from custom_components.solis_modbus.cloud.cloud_controller import SolisCloudController
10-
from custom_components.solis_modbus.helpers import (
8+
from custom_components.solisconnect.cloud.api_client import SolisCloudApiError
9+
from custom_components.solisconnect.cloud.cloud_controller import SolisCloudController
10+
from custom_components.solisconnect.helpers import (
1111
cache_save,
1212
mark_platform_entities_unavailable_for_base_sensors,
1313
notify_register_update,
1414
)
15-
from custom_components.solis_modbus.sensor_data.cloud_mapping import (
15+
from custom_components.solisconnect.sensor_data.cloud_mapping import (
1616
CLOUD_CID_MAP,
1717
CLOUD_INPUT_MAP,
1818
encode_cid_value,
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
DOMAIN = "solis_modbus"
1+
DOMAIN = "solisconnect"
22
CONTROLLER = "modbus_controller"
33
SLAVE = "modbus_controller_slave"
44
MANUFACTURER = "Solis"

0 commit comments

Comments
 (0)