Skip to content

Commit

Permalink
Merge pull request #27 from leeyuentuen/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
leeyuentuen authored Jul 24, 2023
2 parents a069707 + 2ca0fa7 commit 5ae450e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion custom_components/alfen_wallbox/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def __init__(self,
super().__init__(device)
self._device = device
self._attr_name = f"{device.name} {description.name}"
self._attr_unique_id = f"{self._attr_unique_id}_{description.key}"
self._attr_unique_id = f"{self._device.id}_{description.key}"
self.entity_description = description

@property
Expand Down
2 changes: 1 addition & 1 deletion custom_components/alfen_wallbox/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def __init__(
super().__init__(device)
self._device = device
self._attr_name = f"{description.name}"
self._attr_unique_id = f"{description.key}"
self._attr_unique_id = f"{self._device.id}_{description.key}"
self._attr_assumed_state = description.assumed_state
self._attr_device_class = description.device_class
self._attr_icon = description.icon
Expand Down
2 changes: 1 addition & 1 deletion custom_components/alfen_wallbox/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def __init__(
self._device = device
self._attr_name = f"{device.name} {description.name}"

self._attr_unique_id = f"{self._attr_unique_id}_{description.key}"
self._attr_unique_id = f"{self._device.id}_{description.key}"
self._attr_options = description.options
self.entity_description = description
self.values_dict = {v: k for k, v in description.options_dict.items()}
Expand Down
2 changes: 1 addition & 1 deletion custom_components/alfen_wallbox/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __init__(self,
super().__init__(device)
self._device = device
self._attr_name = f"{device.name} {description.name}"
self._attr_unique_id = f"{self._attr_unique_id}_{description.key}"
self._attr_unique_id = f"{self._device.id}_{description.key}"
self.entity_description = description

@property
Expand Down

0 comments on commit 5ae450e

Please sign in to comment.