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:
parent
ff015d4ea4
commit
c8f2d4a82b
4 changed files with 31 additions and 37 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue