Skip to content
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
10 changes: 0 additions & 10 deletions homeassistant/components/alarm_control_panel/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,6 @@ alarm_trigger:
description: An optional code to trigger the alarm control panel with.
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:
description: Send the alarm the toggle chime command.
fields:
Expand Down
14 changes: 9 additions & 5 deletions homeassistant/components/envisalink/alarm_control_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@

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 (
SUPPORT_ALARM_ARM_AWAY,
SUPPORT_ALARM_ARM_HOME,
Expand All @@ -29,6 +32,7 @@
CONF_PANIC,
CONF_PARTITIONNAME,
DATA_EVL,
DOMAIN,
PARTITION_SCHEMA,
SIGNAL_KEYPAD_UPDATE,
SIGNAL_PARTITION_UPDATE,
Expand All @@ -37,7 +41,7 @@

_LOGGER = logging.getLogger(__name__)

SERVICE_ALARM_KEYPRESS = "envisalink_alarm_keypress"
SERVICE_ALARM_KEYPRESS = "alarm_keypress"
ATTR_KEYPRESS = "keypress"
ALARM_KEYPRESS_SCHEMA = vol.Schema(
{
Expand Down Expand Up @@ -83,7 +87,7 @@ def alarm_keypress_handler(service):
device.async_alarm_keypress(keypress)

hass.services.async_register(
alarm.DOMAIN,
DOMAIN,
SERVICE_ALARM_KEYPRESS,
alarm_keypress_handler,
schema=ALARM_KEYPRESS_SCHEMA,
Expand All @@ -92,7 +96,7 @@ def alarm_keypress_handler(service):
return True


class EnvisalinkAlarm(EnvisalinkDevice, alarm.AlarmControlPanel):
class EnvisalinkAlarm(EnvisalinkDevice, AlarmControlPanel):
"""Representation of an Envisalink-based alarm panel."""

def __init__(
Expand Down Expand Up @@ -124,7 +128,7 @@ def code_format(self):
"""Regex for code format or None if no code is required."""
if self._code:
return None
return alarm.FORMAT_NUMBER
return FORMAT_NUMBER

@property
def state(self):
Expand Down
10 changes: 10 additions & 0 deletions homeassistant/components/envisalink/services.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# 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:
description: >
Allows users with DSC panels to trigger a PGM output (1-4).
Expand Down