Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix zwave_js siren name #103016

Merged
merged 2 commits into from
Oct 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion homeassistant/components/zwave_js/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def generate_name(
):
name += f" ({primary_value.endpoint})"

return name
return name.strip()

@property
def available(self) -> bool:
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/zwave_js/siren.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ def __init__(
if self._attr_available_tones:
self._attr_supported_features |= SirenEntityFeature.TONES

self._attr_name = self.generate_name(include_value_name=True)

@property
def is_on(self) -> bool | None:
"""Return whether device is on."""
Expand Down
2 changes: 1 addition & 1 deletion tests/components/zwave_js/test_siren.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from homeassistant.const import STATE_OFF, STATE_ON, STATE_UNKNOWN
from homeassistant.core import HomeAssistant

SIREN_ENTITY = "siren.indoor_siren_6_2"
SIREN_ENTITY = "siren.indoor_siren_6_play_tone_2"

TONE_ID_VALUE_ID = {
"endpoint": 2,
Expand Down
Loading