hass-core/homeassistant/components/ialarm/const.py
Ludovico de Nittis 30618aae94
Reintroduce iAlarm integration (#43525)
The previous iAlarm integration has been removed because it used
webscraping #43010.

Since then, the pyialarm library has been updated to use the iAlarm API
instead.

With this commit I reintroduce the iAlarm integration, leveraging the
new HA config flow.

Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
2021-04-11 10:35:04 -10:00

22 lines
492 B
Python

"""Constants for the iAlarm integration."""
from pyialarm import IAlarm
from homeassistant.const import (
STATE_ALARM_ARMED_AWAY,
STATE_ALARM_ARMED_HOME,
STATE_ALARM_DISARMED,
STATE_ALARM_TRIGGERED,
)
DATA_COORDINATOR = "ialarm"
DEFAULT_PORT = 18034
DOMAIN = "ialarm"
IALARM_TO_HASS = {
IAlarm.ARMED_AWAY: STATE_ALARM_ARMED_AWAY,
IAlarm.ARMED_STAY: STATE_ALARM_ARMED_HOME,
IAlarm.DISARMED: STATE_ALARM_DISARMED,
IAlarm.TRIGGERED: STATE_ALARM_TRIGGERED,
}