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."""
|
"""Constants for the BleBox devices integration."""
|
||||||
|
|
||||||
from homeassistant.components.cover import (
|
from homeassistant.components.cover import (
|
||||||
DEVICE_CLASS_DOOR,
|
|
||||||
DEVICE_CLASS_GATE,
|
|
||||||
DEVICE_CLASS_SHUTTER,
|
|
||||||
STATE_CLOSED,
|
STATE_CLOSED,
|
||||||
STATE_CLOSING,
|
STATE_CLOSING,
|
||||||
STATE_OPEN,
|
STATE_OPEN,
|
||||||
STATE_OPENING,
|
STATE_OPENING,
|
||||||
|
CoverDeviceClass,
|
||||||
)
|
)
|
||||||
from homeassistant.components.switch import DEVICE_CLASS_SWITCH
|
from homeassistant.components.sensor import SensorDeviceClass
|
||||||
from homeassistant.const import DEVICE_CLASS_TEMPERATURE, TEMP_CELSIUS
|
from homeassistant.components.switch import SwitchDeviceClass
|
||||||
|
from homeassistant.const import TEMP_CELSIUS
|
||||||
|
|
||||||
DOMAIN = "blebox"
|
DOMAIN = "blebox"
|
||||||
PRODUCT = "product"
|
PRODUCT = "product"
|
||||||
|
@ -24,11 +23,11 @@ UNSUPPORTED_VERSION = "unsupported_version"
|
||||||
UNKNOWN = "unknown"
|
UNKNOWN = "unknown"
|
||||||
|
|
||||||
BLEBOX_TO_HASS_DEVICE_CLASSES = {
|
BLEBOX_TO_HASS_DEVICE_CLASSES = {
|
||||||
"shutter": DEVICE_CLASS_SHUTTER,
|
"shutter": CoverDeviceClass.SHUTTER,
|
||||||
"gatebox": DEVICE_CLASS_DOOR,
|
"gatebox": CoverDeviceClass.DOOR,
|
||||||
"gate": DEVICE_CLASS_GATE,
|
"gate": CoverDeviceClass.GATE,
|
||||||
"relay": DEVICE_CLASS_SWITCH,
|
"relay": SwitchDeviceClass.SWITCH,
|
||||||
"temperature": DEVICE_CLASS_TEMPERATURE,
|
"temperature": SensorDeviceClass.TEMPERATURE,
|
||||||
}
|
}
|
||||||
|
|
||||||
BLEBOX_TO_HASS_COVER_STATES = {
|
BLEBOX_TO_HASS_COVER_STATES = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue