mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Adjust remaining type hints in alarm properties (#74126)
This commit is contained in:
parent
3836da48b3
commit
29c389b342
@ -141,14 +141,14 @@ class EnvisalinkAlarm(EnvisalinkDevice, AlarmControlPanelEntity):
|
|||||||
self.async_write_ha_state()
|
self.async_write_ha_state()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def code_format(self):
|
def code_format(self) -> CodeFormat | None:
|
||||||
"""Regex for code format or None if no code is required."""
|
"""Regex for code format or None if no code is required."""
|
||||||
if self._code:
|
if self._code:
|
||||||
return None
|
return None
|
||||||
return CodeFormat.NUMBER
|
return CodeFormat.NUMBER
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def state(self):
|
def state(self) -> str:
|
||||||
"""Return the state of the device."""
|
"""Return the state of the device."""
|
||||||
state = STATE_UNKNOWN
|
state = STATE_UNKNOWN
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ class TuyaAlarmEntity(TuyaEntity, AlarmControlPanelEntity):
|
|||||||
self._attr_supported_features |= AlarmControlPanelEntityFeature.TRIGGER
|
self._attr_supported_features |= AlarmControlPanelEntityFeature.TRIGGER
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def state(self):
|
def state(self) -> str | None:
|
||||||
"""Return the state of the device."""
|
"""Return the state of the device."""
|
||||||
if not (status := self.device.status.get(self.entity_description.key)):
|
if not (status := self.device.status.get(self.entity_description.key)):
|
||||||
return None
|
return None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user