mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Use enums in skybell (#62053)
This commit is contained in:
parent
1dab28a957
commit
25f72e45d7
@ -7,9 +7,8 @@ from typing import Any
|
|||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.binary_sensor import (
|
from homeassistant.components.binary_sensor import (
|
||||||
DEVICE_CLASS_MOTION,
|
|
||||||
DEVICE_CLASS_OCCUPANCY,
|
|
||||||
PLATFORM_SCHEMA,
|
PLATFORM_SCHEMA,
|
||||||
|
BinarySensorDeviceClass,
|
||||||
BinarySensorEntity,
|
BinarySensorEntity,
|
||||||
BinarySensorEntityDescription,
|
BinarySensorEntityDescription,
|
||||||
)
|
)
|
||||||
@ -25,12 +24,12 @@ BINARY_SENSOR_TYPES: dict[str, BinarySensorEntityDescription] = {
|
|||||||
"button": BinarySensorEntityDescription(
|
"button": BinarySensorEntityDescription(
|
||||||
key="device:sensor:button",
|
key="device:sensor:button",
|
||||||
name="Button",
|
name="Button",
|
||||||
device_class=DEVICE_CLASS_OCCUPANCY,
|
device_class=BinarySensorDeviceClass.OCCUPANCY,
|
||||||
),
|
),
|
||||||
"motion": BinarySensorEntityDescription(
|
"motion": BinarySensorEntityDescription(
|
||||||
key="device:sensor:motion",
|
key="device:sensor:motion",
|
||||||
name="Motion",
|
name="Motion",
|
||||||
device_class=DEVICE_CLASS_MOTION,
|
device_class=BinarySensorDeviceClass.MOTION,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user