Use new DeviceClass enums in blebox (#61361)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
fa38a2d0bf
commit
2db1013620
1 changed files with 9 additions and 10 deletions
|
@ -1,16 +1,15 @@
|
|||
"""Constants for the BleBox devices integration."""
|
||||
|
||||
from homeassistant.components.cover import (
|
||||
DEVICE_CLASS_DOOR,
|
||||
DEVICE_CLASS_GATE,
|
||||
DEVICE_CLASS_SHUTTER,
|
||||
STATE_CLOSED,
|
||||
STATE_CLOSING,
|
||||
STATE_OPEN,
|
||||
STATE_OPENING,
|
||||
CoverDeviceClass,
|
||||
)
|
||||
from homeassistant.components.switch import DEVICE_CLASS_SWITCH
|
||||
from homeassistant.const import DEVICE_CLASS_TEMPERATURE, TEMP_CELSIUS
|
||||
from homeassistant.components.sensor import SensorDeviceClass
|
||||
from homeassistant.components.switch import SwitchDeviceClass
|
||||
from homeassistant.const import TEMP_CELSIUS
|
||||
|
||||
DOMAIN = "blebox"
|
||||
PRODUCT = "product"
|
||||
|
@ -24,11 +23,11 @@ UNSUPPORTED_VERSION = "unsupported_version"
|
|||
UNKNOWN = "unknown"
|
||||
|
||||
BLEBOX_TO_HASS_DEVICE_CLASSES = {
|
||||
"shutter": DEVICE_CLASS_SHUTTER,
|
||||
"gatebox": DEVICE_CLASS_DOOR,
|
||||
"gate": DEVICE_CLASS_GATE,
|
||||
"relay": DEVICE_CLASS_SWITCH,
|
||||
"temperature": DEVICE_CLASS_TEMPERATURE,
|
||||
"shutter": CoverDeviceClass.SHUTTER,
|
||||
"gatebox": CoverDeviceClass.DOOR,
|
||||
"gate": CoverDeviceClass.GATE,
|
||||
"relay": SwitchDeviceClass.SWITCH,
|
||||
"temperature": SensorDeviceClass.TEMPERATURE,
|
||||
}
|
||||
|
||||
BLEBOX_TO_HASS_COVER_STATES = {
|
||||
|
|
Loading…
Add table
Reference in a new issue