Add entity_registry_enabled_default and missing EntityCategories in Plugwise (#80629)
parent
bce273660d
commit
9cd2b83422
|
@ -29,6 +29,13 @@ class PlugwiseBinarySensorEntityDescription(BinarySensorEntityDescription):
|
|||
|
||||
|
||||
BINARY_SENSORS: tuple[PlugwiseBinarySensorEntityDescription, ...] = (
|
||||
PlugwiseBinarySensorEntityDescription(
|
||||
key="compressor_state",
|
||||
name="Compressor state",
|
||||
icon="mdi:hvac",
|
||||
icon_off="mdi:hvac-off",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
PlugwiseBinarySensorEntityDescription(
|
||||
key="dhw_state",
|
||||
name="DHW state",
|
||||
|
|
|
@ -18,6 +18,7 @@ from homeassistant.const import (
|
|||
VOLUME_CUBIC_METERS,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity import EntityCategory
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from .const import DOMAIN, UNIT_LUMEN
|
||||
|
@ -31,12 +32,30 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
|
|||
native_unit_of_measurement=TEMP_CELSIUS,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="setpoint_high",
|
||||
name="Cooling setpoint",
|
||||
native_unit_of_measurement=TEMP_CELSIUS,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="setpoint_low",
|
||||
name="Heating setpoint",
|
||||
native_unit_of_measurement=TEMP_CELSIUS,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="temperature",
|
||||
name="Temperature",
|
||||
native_unit_of_measurement=TEMP_CELSIUS,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
|
@ -44,6 +63,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
|
|||
name="Intended boiler temperature",
|
||||
native_unit_of_measurement=TEMP_CELSIUS,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
|
@ -51,6 +71,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
|
|||
name="Temperature difference",
|
||||
native_unit_of_measurement=TEMP_CELSIUS,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
|
@ -65,6 +86,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
|
|||
name="Outdoor air temperature",
|
||||
native_unit_of_measurement=TEMP_CELSIUS,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
|
@ -72,6 +94,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
|
|||
name="Water temperature",
|
||||
native_unit_of_measurement=TEMP_CELSIUS,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
|
@ -79,6 +102,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
|
|||
name="Return temperature",
|
||||
native_unit_of_measurement=TEMP_CELSIUS,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
|
@ -94,6 +118,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
|
|||
native_unit_of_measurement=POWER_WATT,
|
||||
device_class=SensorDeviceClass.POWER,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
entity_registry_enabled_default=False,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="electricity_consumed_interval",
|
||||
|
@ -122,6 +147,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
|
|||
native_unit_of_measurement=ENERGY_WATT_HOUR,
|
||||
device_class=SensorDeviceClass.ENERGY,
|
||||
state_class=SensorStateClass.TOTAL,
|
||||
entity_registry_enabled_default=False,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="electricity_produced_peak_interval",
|
||||
|
@ -226,6 +252,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
|
|||
name="Battery",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
device_class=SensorDeviceClass.BATTERY,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
|
@ -240,12 +267,14 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
|
|||
name="Modulation level",
|
||||
icon="mdi:percent",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="valve_position",
|
||||
name="Valve position",
|
||||
icon="mdi:valve",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
|
@ -254,6 +283,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
|
|||
name="Water pressure",
|
||||
native_unit_of_measurement=PRESSURE_BAR,
|
||||
device_class=SensorDeviceClass.PRESSURE,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
|
@ -268,6 +298,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
|
|||
name="DHW temperature",
|
||||
native_unit_of_measurement=TEMP_CELSIUS,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue