Disable circuits set as 'Don't Show' in ScreenLogic by default (#88518)

This commit is contained in:
Kevin Worrel 2023-02-20 15:30:21 -08:00 committed by GitHub
parent 4f4defc055
commit d54858044c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 5 deletions

View File

@ -15,5 +15,5 @@
"documentation": "https://www.home-assistant.io/integrations/screenlogic",
"iot_class": "local_push",
"loggers": ["screenlogicpy"],
"requirements": ["screenlogicpy==0.7.1"]
"requirements": ["screenlogicpy==0.7.2"]
}

View File

@ -1,7 +1,12 @@
"""Support for a ScreenLogic 'circuit' switch."""
import logging
from screenlogicpy.const import CODE, DATA as SL_DATA, GENERIC_CIRCUIT_NAMES
from screenlogicpy.const import (
CODE,
DATA as SL_DATA,
GENERIC_CIRCUIT_NAMES,
INTERFACE_GROUP,
)
from homeassistant.components.switch import SwitchEntity
from homeassistant.config_entries import ConfigEntry
@ -31,7 +36,8 @@ async def async_setup_entry(
coordinator,
circuit_num,
CODE.STATUS_CHANGED,
circuit["name"] not in GENERIC_CIRCUIT_NAMES,
circuit["name"] not in GENERIC_CIRCUIT_NAMES
and circuit["interface"] != INTERFACE_GROUP.DONT_SHOW,
)
for circuit_num, circuit in circuits.items()
if circuit["function"] not in LIGHT_CIRCUIT_FUNCTIONS

View File

@ -2300,7 +2300,7 @@ satel_integra==0.3.7
scapy==2.5.0
# homeassistant.components.screenlogic
screenlogicpy==0.7.1
screenlogicpy==0.7.2
# homeassistant.components.scsgate
scsgate==0.1.0

View File

@ -1621,7 +1621,7 @@ samsungtvws[async,encrypted]==2.5.0
scapy==2.5.0
# homeassistant.components.screenlogic
screenlogicpy==0.7.1
screenlogicpy==0.7.2
# homeassistant.components.backup
securetar==2022.2.0