Replace all instances of Sunsynk with Solarman

:%s/Sunsynk/Solarman/g
This commit is contained in:
Jonathan McCrohan 2022-04-04 01:11:38 +01:00
parent 5e1abbf0d1
commit bdf7ffa166
2 changed files with 6 additions and 6 deletions

View File

@ -1,7 +1,7 @@
{
"omnik": {
"version": "0.0.1",
"local_location": "/custom_components/sunsynk/sensor.py",
"local_location": "/custom_components/solarman/sensor.py",
"remote_location": "https://raw.githubusercontent.com/StephanJoubert/home_assistant_solarman/master/custom_components/solarman/sensor.py",
"visit_repo": "https://github.com/StephanJouberts/home_assistant_solarman",
"changelog": "https://github.com/StephanJoubert/home_assistant_solarman",

View File

@ -48,8 +48,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_e
else:
hass_sensors.append(SunsynkSensor(inverter_name, inverter, sensor, inverter_sn))
hass_sensors.append(SynsynkStatus(inverter_name, inverter, "status_lastUpdate", inverter_sn))
hass_sensors.append(SynsynkStatus(inverter_name, inverter, "status_connection", inverter_sn))
hass_sensors.append(SolarmanStatus(inverter_name, inverter, "status_lastUpdate", inverter_sn))
hass_sensors.append(SolarmanStatus(inverter_name, inverter, "status_connection", inverter_sn))
_LOGGER.debug(f'sensor.py:async_setup_entry: async_add_entities')
_LOGGER.debug(hass_sensors)
@ -61,7 +61,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_e
# It derives from the Entity class in HA and is suited for status values.
#############################################################################################################
class SynsynkStatus(Entity):
class SolarmanStatus(Entity):
def __init__(self, inverter_name, inverter, field_name, sn):
self._inverter_name = inverter_name
self.inverter = inverter
@ -99,9 +99,9 @@ class SynsynkStatus(Entity):
# Overrides the Status entity, supply the configured icon, and updates the inverter parameters
#############################################################################################################
class SunsynkSensorText(SynsynkStatus):
class SunsynkSensorText(SolarmanStatus):
def __init__(self, inverter_name, inverter, sensor, sn):
SynsynkStatus.__init__(self,inverter_name, inverter, sensor['name'], sn)
SolarmanStatus.__init__(self,inverter_name, inverter, sensor['name'], sn)
if 'icon' in sensor:
self.p_icon = sensor['icon']
else: