Clean up Abode imports (#113138)
This commit is contained in:
parent
18a7f004db
commit
d33fdd3289
8 changed files with 64 additions and 47 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue