mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 17:57:55 +00:00
Assign entity_category for incomfort entities (#135807)
This commit is contained in:
parent
9b66ba61a8
commit
60d51bf4ad
@ -13,6 +13,7 @@ from homeassistant.components.binary_sensor import (
|
||||
BinarySensorEntity,
|
||||
BinarySensorEntityDescription,
|
||||
)
|
||||
from homeassistant.const import EntityCategory
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
@ -29,6 +30,7 @@ class IncomfortBinarySensorEntityDescription(BinarySensorEntityDescription):
|
||||
|
||||
value_key: str
|
||||
extra_state_attributes_fn: Callable[[dict[str, Any]], dict[str, Any]] | None = None
|
||||
entity_category: EntityCategory = EntityCategory.DIAGNOSTIC
|
||||
|
||||
|
||||
SENSOR_TYPES: tuple[IncomfortBinarySensorEntityDescription, ...] = (
|
||||
|
@ -12,7 +12,7 @@ from homeassistant.components.climate import (
|
||||
HVACAction,
|
||||
HVACMode,
|
||||
)
|
||||
from homeassistant.const import ATTR_TEMPERATURE, UnitOfTemperature
|
||||
from homeassistant.const import ATTR_TEMPERATURE, EntityCategory, UnitOfTemperature
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.device_registry import DeviceInfo
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
@ -44,6 +44,7 @@ async def async_setup_entry(
|
||||
class InComfortClimate(IncomfortEntity, ClimateEntity):
|
||||
"""Representation of an InComfort/InTouch climate device."""
|
||||
|
||||
_attr_entity_category = EntityCategory.CONFIG
|
||||
_attr_min_temp = 5.0
|
||||
_attr_max_temp = 30.0
|
||||
_attr_name = None
|
||||
|
@ -13,7 +13,7 @@ from homeassistant.components.sensor import (
|
||||
SensorEntityDescription,
|
||||
SensorStateClass,
|
||||
)
|
||||
from homeassistant.const import UnitOfPressure, UnitOfTemperature
|
||||
from homeassistant.const import EntityCategory, UnitOfPressure, UnitOfTemperature
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.typing import StateType
|
||||
@ -31,6 +31,7 @@ class IncomfortSensorEntityDescription(SensorEntityDescription):
|
||||
|
||||
value_key: str
|
||||
extra_key: str | None = None
|
||||
entity_category = EntityCategory.DIAGNOSTIC
|
||||
|
||||
|
||||
SENSOR_TYPES: tuple[IncomfortSensorEntityDescription, ...] = (
|
||||
|
@ -8,7 +8,7 @@ from typing import Any
|
||||
from incomfortclient import Heater as InComfortHeater
|
||||
|
||||
from homeassistant.components.water_heater import WaterHeaterEntity
|
||||
from homeassistant.const import UnitOfTemperature
|
||||
from homeassistant.const import EntityCategory, UnitOfTemperature
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
@ -37,6 +37,7 @@ async def async_setup_entry(
|
||||
class IncomfortWaterHeater(IncomfortBoilerEntity, WaterHeaterEntity):
|
||||
"""Representation of an InComfort/Intouch water_heater device."""
|
||||
|
||||
_attr_entity_category = EntityCategory.DIAGNOSTIC
|
||||
_attr_min_temp = 30.0
|
||||
_attr_max_temp = 80.0
|
||||
_attr_name = None
|
||||
|
@ -10,7 +10,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'binary_sensor',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'binary_sensor.boiler_burner',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -57,7 +57,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'binary_sensor',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'binary_sensor.boiler_fault',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -105,7 +105,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'binary_sensor',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'binary_sensor.boiler_hot_water_tap',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -152,7 +152,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'binary_sensor',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'binary_sensor.boiler_pump',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -199,7 +199,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'binary_sensor',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'binary_sensor.boiler_burner',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -246,7 +246,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'binary_sensor',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'binary_sensor.boiler_fault',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -294,7 +294,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'binary_sensor',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'binary_sensor.boiler_hot_water_tap',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -341,7 +341,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'binary_sensor',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'binary_sensor.boiler_pump',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -388,7 +388,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'binary_sensor',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'binary_sensor.boiler_burner',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -435,7 +435,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'binary_sensor',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'binary_sensor.boiler_fault',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -483,7 +483,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'binary_sensor',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'binary_sensor.boiler_hot_water_tap',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -530,7 +530,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'binary_sensor',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'binary_sensor.boiler_pump',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -577,7 +577,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'binary_sensor',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'binary_sensor.boiler_burner',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -624,7 +624,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'binary_sensor',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'binary_sensor.boiler_fault',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -672,7 +672,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'binary_sensor',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'binary_sensor.boiler_hot_water_tap',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -719,7 +719,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'binary_sensor',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'binary_sensor.boiler_pump',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -766,7 +766,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'binary_sensor',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'binary_sensor.boiler_burner',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -813,7 +813,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'binary_sensor',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'binary_sensor.boiler_fault',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -861,7 +861,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'binary_sensor',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'binary_sensor.boiler_hot_water_tap',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -908,7 +908,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'binary_sensor',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'binary_sensor.boiler_pump',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
|
@ -16,7 +16,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'climate',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'climate.thermostat_1',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -82,7 +82,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'climate',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'climate.thermostat_1',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -148,7 +148,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'climate',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'climate.thermostat_1',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -214,7 +214,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'climate',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'climate.thermostat_1',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
|
@ -12,7 +12,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'sensor',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'sensor.boiler_pressure',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -63,7 +63,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'sensor',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'sensor.boiler_tap_temperature',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@ -115,7 +115,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'sensor',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'sensor.boiler_temperature',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
|
@ -13,7 +13,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'water_heater',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'water_heater.boiler',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
|
Loading…
x
Reference in New Issue
Block a user