Use new enums in goalzero (#61518)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
c060b5926c
commit
c69e479bfd
2 changed files with 31 additions and 39 deletions
|
@ -4,15 +4,14 @@ from __future__ import annotations
|
|||
from typing import cast
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
DEVICE_CLASS_BATTERY_CHARGING,
|
||||
DEVICE_CLASS_CONNECTIVITY,
|
||||
DEVICE_CLASS_POWER,
|
||||
BinarySensorDeviceClass,
|
||||
BinarySensorEntity,
|
||||
BinarySensorEntityDescription,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import CONF_NAME, ENTITY_CATEGORY_DIAGNOSTIC
|
||||
from homeassistant.const import CONF_NAME
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity import EntityCategory
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
|
||||
|
||||
|
@ -30,18 +29,18 @@ BINARY_SENSOR_TYPES: tuple[BinarySensorEntityDescription, ...] = (
|
|||
BinarySensorEntityDescription(
|
||||
key="app_online",
|
||||
name="App Online",
|
||||
device_class=DEVICE_CLASS_CONNECTIVITY,
|
||||
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
|
||||
device_class=BinarySensorDeviceClass.CONNECTIVITY,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
BinarySensorEntityDescription(
|
||||
key="isCharging",
|
||||
name="Charging",
|
||||
device_class=DEVICE_CLASS_BATTERY_CHARGING,
|
||||
device_class=BinarySensorDeviceClass.BATTERY_CHARGING,
|
||||
),
|
||||
BinarySensorEntityDescription(
|
||||
key="inputDetected",
|
||||
name="Input Detected",
|
||||
device_class=DEVICE_CLASS_POWER,
|
||||
device_class=BinarySensorDeviceClass.POWER,
|
||||
),
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue