Skip to content

Commit

Permalink
Some fixes and cleanup before stopping for today
Browse files Browse the repository at this point in the history
  • Loading branch information
scspijker committed Jul 24, 2024
1 parent 41e7097 commit c711fea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion custom_components/button_plus/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def __init__(self, btn_id: int, hub: ButtonPlusHub):
self._name = f"Button {btn_id}"
self._device_class = ButtonDeviceClass.IDENTIFY
self._connector: Connector = hub.config.connector_for(btn_id // 2)
self.our_id = self.unique_id_gen()
self._attr_unique_id = self.unique_id_gen()

def unique_id_gen(self):
match self._connector.connector_type():
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import List

from button_plus.button_plus_api.connector_type import ConnectorType
from custom_components.button_plus.button_plus_api.connector_type import ConnectorType


class Connector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_model_v1_12():
# Assert the values from the parsed Core object
assert device_config.core.name == "btn_4584b8"
assert device_config.core.location == "Room 1"
assert device_config.core.auto_backup == "true"
assert device_config.core.auto_backup
assert device_config.core.brightness == 80
assert device_config.core.color == 16765791
assert device_config.core.statusbar == 2
Expand Down

0 comments on commit c711fea

Please # to comment.