Bump screenlogicpy to 0.6.3 (#85799)

Co-authored-by: J. Nick Koston <nick@koston.org>
fixes undefined
This commit is contained in:
Kevin Worrel 2023-01-13 14:58:23 -05:00 committed by GitHub
parent bce7bd771e
commit 21cdb6ece3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 3 deletions

View File

@ -15,6 +15,13 @@ from .const import DOMAIN
SL_DEVICE_TYPE_TO_HA_DEVICE_CLASS = {DEVICE_TYPE.ALARM: BinarySensorDeviceClass.PROBLEM}
SUPPORTED_CONFIG_BINARY_SENSORS = (
"freeze_mode",
"pool_delay",
"spa_delay",
"cleaner_delay",
)
async def async_setup_entry(
hass: HomeAssistant,
@ -28,6 +35,14 @@ async def async_setup_entry(
# Generic binary sensor
entities.append(ScreenLogicBinarySensor(coordinator, "chem_alarm"))
entities.extend(
[
ScreenlogicConfigBinarySensor(coordinator, cfg_sensor)
for cfg_sensor in coordinator.data[SL_DATA.KEY_CONFIG]
if cfg_sensor in SUPPORTED_CONFIG_BINARY_SENSORS
]
)
if (
coordinator.data[SL_DATA.KEY_CONFIG]["equipment_flags"]
& EQUIPMENT.FLAG_INTELLICHEM
@ -119,3 +134,12 @@ class ScreenlogicSCGBinarySensor(ScreenLogicBinarySensor):
def sensor(self):
"""Shortcut to access the sensor data."""
return self.coordinator.data[SL_DATA.KEY_SCG][self._data_key]
class ScreenlogicConfigBinarySensor(ScreenLogicBinarySensor):
"""Representation of a ScreenLogic config data binary sensor entity."""
@property
def sensor(self):
"""Shortcut to access the sensor data."""
return self.coordinator.data[SL_DATA.KEY_CONFIG][self._data_key]

View File

@ -3,7 +3,7 @@
"name": "Pentair ScreenLogic",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/screenlogic",
"requirements": ["screenlogicpy==0.6.2"],
"requirements": ["screenlogicpy==0.6.3"],
"codeowners": ["@dieselrabbit", "@bdraco"],
"dhcp": [
{ "registered_devices": true },

View File

@ -2278,7 +2278,7 @@ satel_integra==0.3.7
scapy==2.5.0
# homeassistant.components.screenlogic
screenlogicpy==0.6.2
screenlogicpy==0.6.3
# homeassistant.components.scsgate
scsgate==0.1.0

View File

@ -1599,7 +1599,7 @@ samsungtvws[async,encrypted]==2.5.0
scapy==2.5.0
# homeassistant.components.screenlogic
screenlogicpy==0.6.2
screenlogicpy==0.6.3
# homeassistant.components.backup
securetar==2022.2.0