Fix zwave_js siren name (#103016)

* Fix zwave_js.siren name

* Fix test
This commit is contained in:
Raman Gupta 2023-10-29 12:44:15 -04:00 committed by GitHub
parent 59f238b9a7
commit 94e192db12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View file

@ -206,7 +206,7 @@ class ZWaveBaseEntity(Entity):
):
name += f" ({primary_value.endpoint})"
return name
return name.strip()
@property
def available(self) -> bool:

View file

@ -72,6 +72,8 @@ class ZwaveSirenEntity(ZWaveBaseEntity, SirenEntity):
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."""

View file

@ -9,7 +9,7 @@ from homeassistant.components.siren import (
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,