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 @@ from itertools import chain
import logging
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_CONNECTIVITY,
DEVICE_CLASS_OCCUPANCY,
DEVICE_CLASS_SOUND,
BinarySensorEntity,
@ -13,7 +14,7 @@ from . import CONF_BINARY_SENSORS, DATA_NEST, DATA_NEST_CONFIG, NestSensorDevice
_LOGGER = logging.getLogger(__name__)
BINARY_TYPES = {"online": "connectivity"}
BINARY_TYPES = {"online": DEVICE_CLASS_CONNECTIVITY}
CLIMATE_BINARY_TYPES = {
"fan": None,