Use enums in screenlogic (#62049)

This commit is contained in:
Robert Hillis 2021-12-16 12:38:32 -05:00 committed by GitHub
parent 21e46e318d
commit 31bef18e9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 9 deletions

View file

@ -2,14 +2,14 @@
from screenlogicpy.const import DATA as SL_DATA, DEVICE_TYPE, EQUIPMENT, ON_OFF
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_PROBLEM,
BinarySensorDeviceClass,
BinarySensorEntity,
)
from . import ScreenlogicEntity
from .const import DOMAIN
SL_DEVICE_TYPE_TO_HA_DEVICE_CLASS = {DEVICE_TYPE.ALARM: DEVICE_CLASS_PROBLEM}
SL_DEVICE_TYPE_TO_HA_DEVICE_CLASS = {DEVICE_TYPE.ALARM: BinarySensorDeviceClass.PROBLEM}
async def async_setup_entry(hass, config_entry, async_add_entities):