Use connectivity device class constant in various integrations (#39972)

This commit is contained in:
springstan 2020-09-12 20:21:57 +02:00 committed by GitHub
parent 6751a38b8e
commit 3d4ef8cfe1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 55 additions and 28 deletions

View file

@ -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),