File tree Expand file tree Collapse file tree 3 files changed +19
-3
lines changed
custom_components/plugwise Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Original file line number Diff line number Diff 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 ()
Original file line number Diff line number Diff 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 ]
Original file line number Diff line number Diff 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 ]
You can’t perform that action at this time.
0 commit comments