Use new enums in freedompro (#61445)

* Use new enums in freedompro
* Also update PLATFORMS

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2021-12-13 12:57:16 +01:00 committed by GitHub
parent ff015d4ea4
commit c8f2d4a82b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 37 deletions

View file

@ -1,9 +1,6 @@
"""Support for Freedompro binary_sensor."""
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_MOTION,
DEVICE_CLASS_OCCUPANCY,
DEVICE_CLASS_OPENING,
DEVICE_CLASS_SMOKE,
BinarySensorDeviceClass,
BinarySensorEntity,
)
from homeassistant.core import callback
@ -13,10 +10,10 @@ from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import DOMAIN
DEVICE_CLASS_MAP = {
"smokeSensor": DEVICE_CLASS_SMOKE,
"occupancySensor": DEVICE_CLASS_OCCUPANCY,
"motionSensor": DEVICE_CLASS_MOTION,
"contactSensor": DEVICE_CLASS_OPENING,
"smokeSensor": BinarySensorDeviceClass.SMOKE,
"occupancySensor": BinarySensorDeviceClass.OCCUPANCY,
"motionSensor": BinarySensorDeviceClass.MOTION,
"contactSensor": BinarySensorDeviceClass.OPENING,
}
DEVICE_KEY_MAP = {