mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
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:
parent
cf30895460
commit
da0ff8d8c4
@ -2,6 +2,6 @@
|
||||
"domain": "saj",
|
||||
"name": "SAJ Solar Inverter",
|
||||
"documentation": "https://www.home-assistant.io/integrations/saj",
|
||||
"requirements": ["pysaj==0.0.14"],
|
||||
"requirements": ["pysaj==0.0.16"],
|
||||
"codeowners": ["@fredericvl"]
|
||||
}
|
||||
|
@ -91,9 +91,10 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
|
||||
raise PlatformNotReady
|
||||
|
||||
for sensor in sensor_def:
|
||||
hass_sensors.append(
|
||||
SAJsensor(saj.serialnumber, sensor, inverter_name=config.get(CONF_NAME))
|
||||
)
|
||||
if sensor.enabled:
|
||||
hass_sensors.append(
|
||||
SAJsensor(saj.serialnumber, sensor, inverter_name=config.get(CONF_NAME))
|
||||
)
|
||||
|
||||
async_add_entities(hass_sensors)
|
||||
|
||||
|
@ -1557,7 +1557,7 @@ pyrepetier==3.0.5
|
||||
pysabnzbd==1.1.0
|
||||
|
||||
# homeassistant.components.saj
|
||||
pysaj==0.0.14
|
||||
pysaj==0.0.16
|
||||
|
||||
# homeassistant.components.sony_projector
|
||||
pysdcp==1
|
||||
|
Loading…
x
Reference in New Issue
Block a user