Skip to content

Commit b7792a8

Browse files
committed
Remove #265 references
1 parent 3bda9e9 commit b7792a8

File tree

5 files changed

+1
-15
lines changed

5 files changed

+1
-15
lines changed

custom_components/plugwise_usb/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ class PlugwiseUSBEntity(Entity):
189189

190190
entity_description: PlugwiseEntityDescription
191191

192-
# Github issue #265: the entity_description is not working accordingly
193192
def __init__(
194193
self, node: PlugwiseNode, entity_description: PlugwiseEntityDescription
195194
) -> None:
@@ -203,9 +202,7 @@ def __init__(
203202
"sw_version": f"{node.firmware_version}",
204203
}
205204
self._attr_name = f"{entity_description.name} ({node.mac[-5:]})"
206-
# Github issue #265
207205
self._attr_should_poll = entity_description.should_poll
208-
# /Github issue #265
209206
self._attr_unique_id = f"{node.mac}-{entity_description.key}"
210207
self._node = node
211208
self.entity_description = entity_description

custom_components/plugwise_usb/binary_sensor.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ def discoved_device(mac: str):
8787
api_stick.subscribe_stick_callback(discoved_device, CB_NEW_NODE)
8888

8989

90-
# pw-beta
91-
# Github issue #265
9290
class USBBinarySensor(PlugwiseUSBEntity, BinarySensorEntity): # type: ignore[misc]
9391
"""Representation of a Plugwise USB Binary Sensor."""
9492

@@ -101,7 +99,6 @@ def __init__(
10199
@property
102100
def is_on(self) -> bool:
103101
"""Return true if the binary_sensor is on."""
104-
# Github issue #265
105102
return getattr(self._node, self.entity_description.state_request_method)
106103

107104
def _service_scan_config(self, **kwargs):

custom_components/plugwise_usb/config_flow.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ def plugwise_stick_entries(hass): # pw-beta usb
3434
return sticks
3535

3636

37-
# Github issue: #265
38-
# Might be a `tuple[dict[str, str], Stick | None]` for typing, but that throws
39-
# Item None of Optional[Any] not having attribute mac [union-attr]
4037
async def validate_usb_connection(
4138
self, device_path=None
4239
) -> tuple[dict[str, str], Any]: # pw-beta usb

custom_components/plugwise_usb/sensor.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ def discoved_device(mac: str):
4747
api_stick.subscribe_stick_callback(discoved_device, CB_NEW_NODE)
4848

4949

50-
# Github issue #265
5150
class USBSensor(PlugwiseUSBEntity, SensorEntity): # type: ignore[misc] # pw-beta usb
5251
"""Representation of a Plugwise USB sensor."""
5352

@@ -60,9 +59,7 @@ def __init__(
6059
@property
6160
def native_value(self) -> float | None:
6261
"""Return the native value of the sensor."""
63-
# Github issue #265
6462
state_value = getattr(self._node, self.entity_description.state_request_method)
65-
# /Github issue #265
6663
if state_value is not None:
6764
return float(round(state_value, 3))
6865
return None

custom_components/plugwise_usb/switch.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ def discoved_device(mac: str):
4545
api_stick.subscribe_stick_callback(discoved_device, CB_NEW_NODE)
4646

4747

48-
# Github issue #265
49-
class USBSwitch(PlugwiseUSBEntity, SwitchEntity): # type: ignore[misc] # pw-beta usb
48+
class USBSwitch(PlugwiseUSBEntity, SwitchEntity): # type: ignore[misc]
5049
"""Representation of a Stick Node switch."""
5150

5251
def __init__(
@@ -58,7 +57,6 @@ def __init__(
5857
@property
5958
def is_on(self) -> bool:
6059
"""Return true if the switch is on."""
61-
# Github issue #265
6260
return getattr(self._node, self.entity_description.state_request_method)
6361

6462
def turn_off(self, **kwargs):

0 commit comments

Comments
 (0)