mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Change return text code for alarm control panels (#20055)
* Change return text code for alarmdotcom * Change return text code for ialarm * Change return text code for IFTTT * Change return text code for manual alarm panel * Change return text code for manual MQTT alarm * Change return text code for MQTT * Change return text code for Simplisafe
This commit is contained in:
parent
5652a4a58b
commit
fff3cb0b46
@ -82,7 +82,7 @@ class AlarmDotCom(alarm.AlarmControlPanel):
|
||||
return None
|
||||
if isinstance(self._code, str) and re.search('^\\d+$', self._code):
|
||||
return alarm.FORMAT_NUMBER
|
||||
return 'Any'
|
||||
return alarm.FORMAT_TEXT
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
|
@ -83,7 +83,7 @@ class IAlarmPanel(alarm.AlarmControlPanel):
|
||||
return None
|
||||
if isinstance(self._code, str) and re.search('^\\d+$', self._code):
|
||||
return alarm.FORMAT_NUMBER
|
||||
return 'Any'
|
||||
return alarm.FORMAT_TEXT
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
|
@ -130,7 +130,7 @@ class IFTTTAlarmPanel(alarm.AlarmControlPanel):
|
||||
return None
|
||||
if isinstance(self._code, str) and re.search('^\\d+$', self._code):
|
||||
return alarm.FORMAT_NUMBER
|
||||
return 'Any'
|
||||
return alarm.FORMAT_TEXT
|
||||
|
||||
def alarm_disarm(self, code=None):
|
||||
"""Send disarm command."""
|
||||
|
@ -208,7 +208,7 @@ class ManualAlarm(alarm.AlarmControlPanel, RestoreEntity):
|
||||
return None
|
||||
if isinstance(self._code, str) and re.search('^\\d+$', self._code):
|
||||
return alarm.FORMAT_NUMBER
|
||||
return 'Any'
|
||||
return alarm.FORMAT_TEXT
|
||||
|
||||
def alarm_disarm(self, code=None):
|
||||
"""Send disarm command."""
|
||||
|
@ -242,7 +242,7 @@ class ManualMQTTAlarm(alarm.AlarmControlPanel):
|
||||
return None
|
||||
if isinstance(self._code, str) and re.search('^\\d+$', self._code):
|
||||
return alarm.FORMAT_NUMBER
|
||||
return 'Any'
|
||||
return alarm.FORMAT_TEXT
|
||||
|
||||
def alarm_disarm(self, code=None):
|
||||
"""Send disarm command."""
|
||||
|
@ -173,7 +173,7 @@ class MqttAlarm(MqttAvailability, MqttDiscoveryUpdate, MqttEntityDeviceInfo,
|
||||
return None
|
||||
if isinstance(code, str) and re.search('^\\d+$', code):
|
||||
return alarm.FORMAT_NUMBER
|
||||
return 'Any'
|
||||
return alarm.FORMAT_TEXT
|
||||
|
||||
async def async_alarm_disarm(self, code=None):
|
||||
"""Send disarm command.
|
||||
|
@ -65,7 +65,7 @@ class SimpliSafeAlarm(alarm.AlarmControlPanel):
|
||||
return None
|
||||
if isinstance(self._code, str) and re.search('^\\d+$', self._code):
|
||||
return alarm.FORMAT_NUMBER
|
||||
return 'Any'
|
||||
return alarm.FORMAT_TEXT
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user