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,7 +3,10 @@ from typing import Callable, Dict
from aioguardian import Client
from homeassistant.components.binary_sensor import BinarySensorEntity
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_CONNECTIVITY,
BinarySensorEntity,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
@ -22,7 +25,7 @@ ATTR_CONNECTED_CLIENTS = "connected_clients"
SENSOR_KIND_AP_INFO = "ap_enabled"
SENSOR_KIND_LEAK_DETECTED = "leak_detected"
SENSORS = [
(SENSOR_KIND_AP_INFO, "Onboard AP Enabled", "connectivity"),
(SENSOR_KIND_AP_INFO, "Onboard AP Enabled", DEVICE_CLASS_CONNECTIVITY),
(SENSOR_KIND_LEAK_DETECTED, "Leak Detected", "moisture"),
]