Clean up Abode imports (#113138)

This commit is contained in:
Joost Lekkerkerker 2024-03-12 18:38:57 +01:00 committed by GitHub
parent 18a7f004db
commit d33fdd3289
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 64 additions and 47 deletions

View file

@ -4,8 +4,14 @@ from __future__ import annotations
from typing import cast
from jaraco.abode.devices.sensor import BinarySensor as ABBinarySensor
from jaraco.abode.helpers import constants as CONST
from jaraco.abode.devices.sensor import BinarySensor
from jaraco.abode.helpers.constants import (
TYPE_CONNECTIVITY,
TYPE_MOISTURE,
TYPE_MOTION,
TYPE_OCCUPANCY,
TYPE_OPENING,
)
from homeassistant.components.binary_sensor import (
BinarySensorDeviceClass,
@ -27,11 +33,11 @@ async def async_setup_entry(
data: AbodeSystem = hass.data[DOMAIN]
device_types = [
CONST.TYPE_CONNECTIVITY,
CONST.TYPE_MOISTURE,
CONST.TYPE_MOTION,
CONST.TYPE_OCCUPANCY,
CONST.TYPE_OPENING,
TYPE_CONNECTIVITY,
TYPE_MOISTURE,
TYPE_MOTION,
TYPE_OCCUPANCY,
TYPE_OPENING,
]
async_add_entities(
@ -44,7 +50,7 @@ class AbodeBinarySensor(AbodeDevice, BinarySensorEntity):
"""A binary sensor implementation for Abode device."""
_attr_name = None
_device: ABBinarySensor
_device: BinarySensor
@property
def is_on(self) -> bool: