Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add entity_registry_enabled_default and missing EntityCategories in Plugwise #80629

Merged
merged 18 commits into from
Oct 21, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add missing sensors, add enabled_default
  • Loading branch information
bouwew committed Oct 21, 2022
commit c3620006a50a5de34177a5c71045176c8155d3ff
19 changes: 19 additions & 0 deletions homeassistant/components/plugwise/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,21 @@
native_unit_of_measurement=TEMP_CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
),
SensorEntityDescription(
key="setpoint_high",
name="Cooling setpoint",
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=TEMP_CELSIUS,
entity_registry_enabled_default=False,
),
SensorEntityDescription(
key="setpoint_low",
name="Heating setpoint",
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=TEMP_CELSIUS,
entity_registry_enabled_default=False,
),
SensorEntityDescription(
key="temperature",
Expand All @@ -52,6 +67,7 @@
native_unit_of_measurement=TEMP_CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
),
SensorEntityDescription(
key="outdoor_temperature",
Expand Down Expand Up @@ -94,13 +110,15 @@
native_unit_of_measurement=POWER_WATT,
device_class=SensorDeviceClass.POWER,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
frenck marked this conversation as resolved.
Show resolved Hide resolved
),
SensorEntityDescription(
key="electricity_consumed_interval",
name="Electricity consumed interval",
native_unit_of_measurement=ENERGY_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL,
entity_registry_enabled_default=False,
bouwew marked this conversation as resolved.
Show resolved Hide resolved
),
SensorEntityDescription(
key="electricity_consumed_peak_interval",
Expand Down Expand Up @@ -313,6 +331,7 @@ def __init__(
"""Initialise the sensor."""
super().__init__(coordinator, device_id)
self.entity_description = description

self._attr_unique_id = f"{device_id}-{description.key}"

@property
Expand Down