Only add SAJ sensors that are enabled and available (#34978)
* Bump pysaj to 0.0.16 * Only add SAJ sensors that are enabled/available
This commit is contained in:
1 parent
cf30895460
commit
da0ff8d8c4
3 files changed
+6
-5
No files matched your search
@@ -2,6 +2,6 @@
|
|||||||
"domain": "saj",
|
"domain": "saj",
|
||||||
"name": "SAJ Solar Inverter",
|
"name": "SAJ Solar Inverter",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/saj",
|
"documentation": "https://www.home-assistant.io/integrations/saj",
|
||||||
"requirements": ["pysaj==0.0.14"],
|
"requirements": ["pysaj==0.0.16"],
|
||||||
"codeowners": ["@fredericvl"]
|
"codeowners": ["@fredericvl"]
|
||||||
}
|
}
|
||||||
@@ -91,9 +91,10 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
|
|||||||
raise PlatformNotReady
|
raise PlatformNotReady
|
||||||
|
|
||||||
for sensor in sensor_def:
|
for sensor in sensor_def:
|
||||||
hass_sensors.append(
|
if sensor.enabled:
|
||||||
SAJsensor(saj.serialnumber, sensor, inverter_name=config.get(CONF_NAME))
|
hass_sensors.append(
|
||||||
)
|
SAJsensor(saj.serialnumber, sensor, inverter_name=config.get(CONF_NAME))
|
||||||
|
)
|
||||||
|
|
||||||
async_add_entities(hass_sensors)
|
async_add_entities(hass_sensors)
|
||||||
|
|
||||||
|
|||||||
@@ -1557,7 +1557,7 @@ pyrepetier==3.0.5
|
|||||||
pysabnzbd==1.1.0
|
pysabnzbd==1.1.0
|
||||||
|
|
||||||
# homeassistant.components.saj
|
# homeassistant.components.saj
|
||||||
pysaj==0.0.14
|
pysaj==0.0.16
|
||||||
|
|
||||||
# homeassistant.components.sony_projector
|
# homeassistant.components.sony_projector
|
||||||
pysdcp==1
|
pysdcp==1
|
||||||
|
|||||||
Reference in new issue
Block a user