Use enums in skybell (#62053)

pull/62067/head
Robert Hillis 2021-12-16 08:19:23 -05:00 committed by GitHub
parent 1dab28a957
commit 25f72e45d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -7,9 +7,8 @@ from typing import Any
import voluptuous as vol
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_MOTION,
DEVICE_CLASS_OCCUPANCY,
PLATFORM_SCHEMA,
BinarySensorDeviceClass,
BinarySensorEntity,
BinarySensorEntityDescription,
)
@ -25,12 +24,12 @@ BINARY_SENSOR_TYPES: dict[str, BinarySensorEntityDescription] = {
"button": BinarySensorEntityDescription(
key="device:sensor:button",
name="Button",
device_class=DEVICE_CLASS_OCCUPANCY,
device_class=BinarySensorDeviceClass.OCCUPANCY,
),
"motion": BinarySensorEntityDescription(
key="device:sensor:motion",
name="Motion",
device_class=DEVICE_CLASS_MOTION,
device_class=BinarySensorDeviceClass.MOTION,
),
}