Use new BinarySensorDeviceClass in insteon (#61801)
Co-authored-by: epenet <epenet@users.noreply.github.com>pull/61823/head
parent
d254d963b8
commit
ef2a28cce2
|
@ -14,17 +14,8 @@ from pyinsteon.groups import (
|
|||
)
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
DEVICE_CLASS_BATTERY,
|
||||
DEVICE_CLASS_DOOR,
|
||||
DEVICE_CLASS_GAS,
|
||||
DEVICE_CLASS_LIGHT,
|
||||
DEVICE_CLASS_MOISTURE,
|
||||
DEVICE_CLASS_MOTION,
|
||||
DEVICE_CLASS_OPENING,
|
||||
DEVICE_CLASS_PROBLEM,
|
||||
DEVICE_CLASS_SAFETY,
|
||||
DEVICE_CLASS_SMOKE,
|
||||
DOMAIN as BINARY_SENSOR_DOMAIN,
|
||||
BinarySensorDeviceClass,
|
||||
BinarySensorEntity,
|
||||
)
|
||||
from homeassistant.core import callback
|
||||
|
@ -35,17 +26,17 @@ from .insteon_entity import InsteonEntity
|
|||
from .utils import async_add_insteon_entities
|
||||
|
||||
SENSOR_TYPES = {
|
||||
OPEN_CLOSE_SENSOR: DEVICE_CLASS_OPENING,
|
||||
MOTION_SENSOR: DEVICE_CLASS_MOTION,
|
||||
DOOR_SENSOR: DEVICE_CLASS_DOOR,
|
||||
LEAK_SENSOR_WET: DEVICE_CLASS_MOISTURE,
|
||||
LIGHT_SENSOR: DEVICE_CLASS_LIGHT,
|
||||
LOW_BATTERY: DEVICE_CLASS_BATTERY,
|
||||
CO_SENSOR: DEVICE_CLASS_GAS,
|
||||
SMOKE_SENSOR: DEVICE_CLASS_SMOKE,
|
||||
TEST_SENSOR: DEVICE_CLASS_SAFETY,
|
||||
SENSOR_MALFUNCTION: DEVICE_CLASS_PROBLEM,
|
||||
HEARTBEAT: DEVICE_CLASS_PROBLEM,
|
||||
OPEN_CLOSE_SENSOR: BinarySensorDeviceClass.OPENING,
|
||||
MOTION_SENSOR: BinarySensorDeviceClass.MOTION,
|
||||
DOOR_SENSOR: BinarySensorDeviceClass.DOOR,
|
||||
LEAK_SENSOR_WET: BinarySensorDeviceClass.MOISTURE,
|
||||
LIGHT_SENSOR: BinarySensorDeviceClass.LIGHT,
|
||||
LOW_BATTERY: BinarySensorDeviceClass.BATTERY,
|
||||
CO_SENSOR: BinarySensorDeviceClass.GAS,
|
||||
SMOKE_SENSOR: BinarySensorDeviceClass.SMOKE,
|
||||
TEST_SENSOR: BinarySensorDeviceClass.SAFETY,
|
||||
SENSOR_MALFUNCTION: BinarySensorDeviceClass.PROBLEM,
|
||||
HEARTBEAT: BinarySensorDeviceClass.PROBLEM,
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue