mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 22:57:17 +00:00
update envisalink service domain (#29126)
This commit is contained in:
parent
1681d36637
commit
2d2ab452ca
@ -60,16 +60,6 @@ alarm_trigger:
|
|||||||
description: An optional code to trigger the alarm control panel with.
|
description: An optional code to trigger the alarm control panel with.
|
||||||
example: 1234
|
example: 1234
|
||||||
|
|
||||||
envisalink_alarm_keypress:
|
|
||||||
description: Send custom keypresses to the alarm.
|
|
||||||
fields:
|
|
||||||
entity_id:
|
|
||||||
description: Name of the alarm control panel to trigger.
|
|
||||||
example: 'alarm_control_panel.downstairs'
|
|
||||||
keypress:
|
|
||||||
description: 'String to send to the alarm panel (1-6 characters).'
|
|
||||||
example: '*71'
|
|
||||||
|
|
||||||
alarmdecoder_alarm_toggle_chime:
|
alarmdecoder_alarm_toggle_chime:
|
||||||
description: Send the alarm the toggle chime command.
|
description: Send the alarm the toggle chime command.
|
||||||
fields:
|
fields:
|
||||||
|
@ -3,7 +3,10 @@ import logging
|
|||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
import homeassistant.components.alarm_control_panel as alarm
|
from homeassistant.components.alarm_control_panel import (
|
||||||
|
AlarmControlPanel,
|
||||||
|
FORMAT_NUMBER,
|
||||||
|
)
|
||||||
from homeassistant.components.alarm_control_panel.const import (
|
from homeassistant.components.alarm_control_panel.const import (
|
||||||
SUPPORT_ALARM_ARM_AWAY,
|
SUPPORT_ALARM_ARM_AWAY,
|
||||||
SUPPORT_ALARM_ARM_HOME,
|
SUPPORT_ALARM_ARM_HOME,
|
||||||
@ -29,6 +32,7 @@ from . import (
|
|||||||
CONF_PANIC,
|
CONF_PANIC,
|
||||||
CONF_PARTITIONNAME,
|
CONF_PARTITIONNAME,
|
||||||
DATA_EVL,
|
DATA_EVL,
|
||||||
|
DOMAIN,
|
||||||
PARTITION_SCHEMA,
|
PARTITION_SCHEMA,
|
||||||
SIGNAL_KEYPAD_UPDATE,
|
SIGNAL_KEYPAD_UPDATE,
|
||||||
SIGNAL_PARTITION_UPDATE,
|
SIGNAL_PARTITION_UPDATE,
|
||||||
@ -37,7 +41,7 @@ from . import (
|
|||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
SERVICE_ALARM_KEYPRESS = "envisalink_alarm_keypress"
|
SERVICE_ALARM_KEYPRESS = "alarm_keypress"
|
||||||
ATTR_KEYPRESS = "keypress"
|
ATTR_KEYPRESS = "keypress"
|
||||||
ALARM_KEYPRESS_SCHEMA = vol.Schema(
|
ALARM_KEYPRESS_SCHEMA = vol.Schema(
|
||||||
{
|
{
|
||||||
@ -83,7 +87,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
|
|||||||
device.async_alarm_keypress(keypress)
|
device.async_alarm_keypress(keypress)
|
||||||
|
|
||||||
hass.services.async_register(
|
hass.services.async_register(
|
||||||
alarm.DOMAIN,
|
DOMAIN,
|
||||||
SERVICE_ALARM_KEYPRESS,
|
SERVICE_ALARM_KEYPRESS,
|
||||||
alarm_keypress_handler,
|
alarm_keypress_handler,
|
||||||
schema=ALARM_KEYPRESS_SCHEMA,
|
schema=ALARM_KEYPRESS_SCHEMA,
|
||||||
@ -92,7 +96,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class EnvisalinkAlarm(EnvisalinkDevice, alarm.AlarmControlPanel):
|
class EnvisalinkAlarm(EnvisalinkDevice, AlarmControlPanel):
|
||||||
"""Representation of an Envisalink-based alarm panel."""
|
"""Representation of an Envisalink-based alarm panel."""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
@ -124,7 +128,7 @@ class EnvisalinkAlarm(EnvisalinkDevice, alarm.AlarmControlPanel):
|
|||||||
"""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 alarm.FORMAT_NUMBER
|
return FORMAT_NUMBER
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def state(self):
|
def state(self):
|
||||||
|
@ -1,5 +1,15 @@
|
|||||||
# Describes the format for available Envisalink services.
|
# Describes the format for available Envisalink services.
|
||||||
|
|
||||||
|
alarm_keypress:
|
||||||
|
description: Send custom keypresses to the alarm.
|
||||||
|
fields:
|
||||||
|
entity_id:
|
||||||
|
description: Name of the alarm control panel to trigger.
|
||||||
|
example: 'alarm_control_panel.downstairs'
|
||||||
|
keypress:
|
||||||
|
description: 'String to send to the alarm panel (1-6 characters).'
|
||||||
|
example: '*71'
|
||||||
|
|
||||||
invoke_custom_function:
|
invoke_custom_function:
|
||||||
description: >
|
description: >
|
||||||
Allows users with DSC panels to trigger a PGM output (1-4).
|
Allows users with DSC panels to trigger a PGM output (1-4).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user