Skip to content

Commit ec1cb24

Browse files
committed
Sorted
1 parent 886f87d commit ec1cb24

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

custom_components/plugwise_usb/entity.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,26 @@ def __init__(
3636
entity_description: PlugwiseUSBEntityDescription,
3737
) -> None:
3838
"""Initialize a Plugwise USB entity."""
39-
self.node_duc = node_duc
4039
super().__init__(node_duc, context=entity_description.node_feature)
40+
self.node_duc = node_duc
41+
self.entity_description = entity_description
42+
self.unsubscribe_push_events: Callable[[], None] | None = None
4143
self._node_info: NodeInfo = node_duc.node.node_info
42-
self._via_device = (DOMAIN, str(node_duc.api_stick.mac_stick))
4344
self._attr_unique_id = f"{self._node_info.mac}-{entity_description.key}"
44-
self.entity_description = entity_description
4545
self._subscribe_to_feature_fn = node_duc.node.subscribe_to_feature_update
46-
self.unsubscribe_push_events: Callable[[], None] | None = None
46+
self._via_device = (DOMAIN, str(node_duc.api_stick.mac_stick))
4747

4848
@property
4949
def device_info(self) -> DeviceInfo:
5050
"""Return DeviceInfo for each created entity."""
5151
return DeviceInfo(
52-
identifiers={(DOMAIN, str(self._node_info.mac))},
53-
name=str(self._node_info.name),
5452
connections={(CONNECTION_ZIGBEE, str(self._node_info.mac))},
5553
hw_version=str(self._node_info.version),
54+
identifiers={(DOMAIN, str(self._node_info.mac))},
5655
manufacturer="Plugwise",
5756
model=str(self._node_info.model),
5857
model_id=str(self._node_info.model_type),
58+
name=str(self._node_info.name),
5959
sw_version=str(self._node_info.firmware),
6060
via_device=self._via_device,
6161
)

0 commit comments

Comments
 (0)