Skip to content

Commit e3c1304

Browse files
committed
Fixes
1 parent 14e05c8 commit e3c1304

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

custom_components/plugwise/entity.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def __init__(
8080

8181
@property
8282
def available(self) -> bool:
83-
"""Return if device is available."""
83+
"""Return if entity is available."""
8484
return (
8585
# Upstream: Do not change the AVAILABLE line below: some Plugwise devices and zones
8686
# Upstream: do not provide their availability-status!
@@ -91,10 +91,9 @@ def available(self) -> bool:
9191

9292
@property
9393
def device(self) -> GwEntityData:
94-
"""Return the plugwise device connected to the device_id."""
94+
"""Return data for this device."""
9595
return self.coordinator.data.devices[self._dev_id]
9696

97-
9897
async def async_added_to_hass(self) -> None:
9998
"""Subscribe to updates."""
10099
self._handle_coordinator_update()

custom_components/plugwise/select.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ def _add_entities() -> None:
8686
if not coordinator.new_devices:
8787
return
8888

89+
# Upstream consts
90+
# async_add_entities(
91+
# PlugwiseSelectEntity(coordinator, device_id, description)
92+
# for device_id in coordinator.new_devices
93+
# for description in SELECT_TYPES
94+
# if description.options_key in coordinator.data.devices[device_id]
95+
# )
96+
# pw-beta alternative for debugging
8997
entities: list[PlugwiseSelectEntity] = []
9098
for device_id in coordinator.new_devices:
9199
device = coordinator.data.devices[device_id]

custom_components/plugwise/sensor.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,15 @@ def _add_entities() -> None:
471471
if not coordinator.new_devices:
472472
return
473473

474+
# Upstream consts
475+
# async_add_entities(
476+
# PlugwiseSensorEntity(coordinator, device_id, description)
477+
# for device_id in coordinator.new_devices
478+
# if (sensors := coordinator.data.devices[device_id].get(SENSORS))
479+
# for description in PLUGWISE_SENSORS
480+
# if description.key in sensors
481+
# )
482+
# pw-beta alternative for debugging
474483
entities: list[PlugwiseSensorEntity] = []
475484
for device_id in coordinator.new_devices:
476485
device = coordinator.data.devices[device_id]

0 commit comments

Comments
 (0)