Use connectivity device class constant in various integrations (#39972)
This commit is contained in:
parent
6751a38b8e
commit
3d4ef8cfe1
10 changed files with 55 additions and 28 deletions
|
@ -3,6 +3,7 @@ import logging
|
|||
from typing import Callable
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
DEVICE_CLASS_CONNECTIVITY,
|
||||
DEVICE_CLASS_DOOR,
|
||||
DEVICE_CLASS_SMOKE,
|
||||
DEVICE_CLASS_WINDOW,
|
||||
|
@ -34,7 +35,7 @@ BINARY_SENSOR_TYPES = {
|
|||
SENSOR_DOOR: ("Door", DEVICE_CLASS_DOOR),
|
||||
SENSOR_GARAGE_DOOR: ("Garage Door", "garage_door"),
|
||||
SENSOR_LEAK: ("Leak Detector", "moisture"),
|
||||
SENSOR_MISSING: ("Missing", "connectivity"),
|
||||
SENSOR_MISSING: ("Missing", DEVICE_CLASS_CONNECTIVITY),
|
||||
SENSOR_SAFE: ("Safe", DEVICE_CLASS_DOOR),
|
||||
SENSOR_SLIDING: ("Sliding Door/Window", DEVICE_CLASS_DOOR),
|
||||
SENSOR_SMOKE_CO: ("Smoke/Carbon Monoxide Detector", DEVICE_CLASS_SMOKE),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue