Skip to content

Commit

Permalink
Fix siren definition (#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
SukramJ authored Feb 16, 2022
1 parent dff095a commit ac9ca40
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Version 0.34.0 (2022-02-16)
- Fix siren definition

Version 0.34.0 (2022-02-15)
- Use backported StrEnum
- Sort constants to identify HA constants
Expand Down
4 changes: 2 additions & 2 deletions hahomematic/devices/entity_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ class EntityDefinition(StrEnum):
ED_REPEATABLE_FIELDS: {
FIELD_ACOUSTIC_ALARM_ACTIVE: "ACOUSTIC_ALARM_ACTIVE",
FIELD_ACOUSTIC_ALARM_SELECTION: "ACOUSTIC_ALARM_SELECTION",
FIELD_OPTICAL_ALARM_ACTIVE: "ACOUSTIC_ALARM_ACTIVE",
FIELD_OPTICAL_ALARM_SELECTION: "ACOUSTIC_ALARM_SELECTION",
FIELD_OPTICAL_ALARM_ACTIVE: "OPTICAL_ALARM_ACTIVE",
FIELD_OPTICAL_ALARM_SELECTION: "OPTICAL_ALARM_SELECTION",
},
},
},
Expand Down
12 changes: 11 additions & 1 deletion hahomematic/devices/siren.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,12 @@ def is_on(self) -> bool:

@property
def available_tones(self) -> list[str] | None:
"""Return a list of available tones.."""
"""Return a list of available tones."""
return None

@property
def available_lights(self) -> list[str] | None:
"""Return a list of available lights."""
return None

@abstractmethod
Expand Down Expand Up @@ -126,6 +131,11 @@ def available_tones(self) -> list[str] | None:
"""Return a list of available tones."""
return cast(list[str], self._e_acoustic_alarm_selection.value_list)

@property
def available_lights(self) -> list[str] | None:
"""Return a list of available lights."""
return cast(list[str], self._e_optical_alarm_selection.value_list)

async def turn_on(
self,
acoustic_alarm: str,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def readme():
},
PACKAGE_NAME = "hahomematic"
HERE = os.path.abspath(os.path.dirname(__file__))
VERSION = "0.34.0"
VERSION = "0.34.1"

PACKAGES = find_packages(exclude=["tests", "tests.*", "dist", "build"])

Expand Down

0 comments on commit ac9ca40

Please sign in to comment.