Add entity category to Advantage Air (#58371)

This commit is contained in:
Brett Adams 2021-10-25 20:45:09 +10:00 committed by GitHub
parent 6d5dd3ee77
commit e529a56430
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View File

@ -5,6 +5,7 @@ from homeassistant.components.binary_sensor import (
DEVICE_CLASS_PROBLEM,
BinarySensorEntity,
)
from homeassistant.const import ENTITY_CATEGORY_CONFIG, ENTITY_CATEGORY_DIAGNOSTIC
from .const import DOMAIN as ADVANTAGE_AIR_DOMAIN
from .entity import AdvantageAirEntity
@ -34,6 +35,7 @@ class AdvantageAirZoneFilter(AdvantageAirEntity, BinarySensorEntity):
"""Advantage Air Filter."""
_attr_device_class = DEVICE_CLASS_PROBLEM
_attr_entity_category = ENTITY_CATEGORY_DIAGNOSTIC
def __init__(self, instance, ac_key):
"""Initialize an Advantage Air Filter."""
@ -72,6 +74,7 @@ class AdvantageAirZoneMyZone(AdvantageAirEntity, BinarySensorEntity):
"""Advantage Air Zone MyZone."""
_attr_entity_registry_enabled_default = False
_attr_entity_category = ENTITY_CATEGORY_CONFIG
def __init__(self, instance, ac_key, zone_key):
"""Initialize an Advantage Air Zone MyZone."""

View File

@ -6,7 +6,12 @@ from homeassistant.components.sensor import (
STATE_CLASS_MEASUREMENT,
SensorEntity,
)
from homeassistant.const import PERCENTAGE, TEMP_CELSIUS
from homeassistant.const import (
ENTITY_CATEGORY_CONFIG,
ENTITY_CATEGORY_DIAGNOSTIC,
PERCENTAGE,
TEMP_CELSIUS,
)
from homeassistant.helpers import config_validation as cv, entity_platform
from .const import ADVANTAGE_AIR_STATE_OPEN, DOMAIN as ADVANTAGE_AIR_DOMAIN
@ -50,6 +55,7 @@ class AdvantageAirTimeTo(AdvantageAirEntity, SensorEntity):
"""Representation of Advantage Air timer control."""
_attr_native_unit_of_measurement = ADVANTAGE_AIR_SET_COUNTDOWN_UNIT
_attr_entity_category = ENTITY_CATEGORY_CONFIG
def __init__(self, instance, ac_key, action):
"""Initialize the Advantage Air timer control."""
@ -84,6 +90,7 @@ class AdvantageAirZoneVent(AdvantageAirEntity, SensorEntity):
_attr_native_unit_of_measurement = PERCENTAGE
_attr_state_class = STATE_CLASS_MEASUREMENT
_attr_entity_category = ENTITY_CATEGORY_DIAGNOSTIC
def __init__(self, instance, ac_key, zone_key):
"""Initialize an Advantage Air Zone Vent Sensor."""
@ -113,6 +120,7 @@ class AdvantageAirZoneSignal(AdvantageAirEntity, SensorEntity):
_attr_native_unit_of_measurement = PERCENTAGE
_attr_state_class = STATE_CLASS_MEASUREMENT
_attr_entity_category = ENTITY_CATEGORY_DIAGNOSTIC
def __init__(self, instance, ac_key, zone_key):
"""Initialize an Advantage Air Zone wireless signal sensor."""
@ -148,6 +156,7 @@ class AdvantageAirZoneTemp(AdvantageAirEntity, SensorEntity):
_attr_device_class = DEVICE_CLASS_TEMPERATURE
_attr_state_class = STATE_CLASS_MEASUREMENT
_attr_entity_registry_enabled_default = False
_attr_entity_category = ENTITY_CATEGORY_DIAGNOSTIC
def __init__(self, instance, ac_key, zone_key):
"""Initialize an Advantage Air Zone Temp Sensor."""