* config flow and coordinator * comply with pylint * Remove pylint errors * Update test coverage yale smart alarm * Update test config_flow * Fix test already configured * Second try test already configured * Fixes config flow and tests * Conform pylint errors coordinator * Fix various review remarks * Correct entity unique id * Fix unique id and migrate entries * Remove lock code * Remove code from test * Expand code coverage config flow test * Add more constants * Add test new requirements * Minor corrections * Resolve conflict alarm schema * Change logger * Changed from review * Fix isort error * Fix flake error * Ignore mypy errors * Corrections from PR review no 2 * Corrections from PR review no 3 * Added tests and fix pylint error * Corrections from PR review no 4 * Corrections from PR review no 5 * Corrections from PR review no 6 * Corrections from PR review no 6_2 * Corrections from PR review no 7 * Corrections from PR review no 8 * Minor last changes for PR * Update homeassistant/components/yale_smart_alarm/coordinator.py Co-authored-by: Raman Gupta <7243222+raman325@users.noreply.github.com>
39 lines
779 B
Python
39 lines
779 B
Python
"""Yale integration constants."""
|
|
import logging
|
|
|
|
from yalesmartalarmclient.client import (
|
|
YALE_STATE_ARM_FULL,
|
|
YALE_STATE_ARM_PARTIAL,
|
|
YALE_STATE_DISARM,
|
|
)
|
|
|
|
from homeassistant.const import (
|
|
STATE_ALARM_ARMED_AWAY,
|
|
STATE_ALARM_ARMED_HOME,
|
|
STATE_ALARM_DISARMED,
|
|
)
|
|
|
|
CONF_AREA_ID = "area_id"
|
|
DEFAULT_NAME = "Yale Smart Alarm"
|
|
DEFAULT_AREA_ID = "1"
|
|
|
|
MANUFACTURER = "Yale"
|
|
MODEL = "main"
|
|
|
|
DOMAIN = "yale_smart_alarm"
|
|
COORDINATOR = "coordinator"
|
|
|
|
DEFAULT_SCAN_INTERVAL = 15
|
|
|
|
LOGGER = logging.getLogger(__name__)
|
|
|
|
ATTR_ONLINE = "online"
|
|
ATTR_STATUS = "status"
|
|
|
|
PLATFORMS = ["alarm_control_panel"]
|
|
|
|
STATE_MAP = {
|
|
YALE_STATE_DISARM: STATE_ALARM_DISARMED,
|
|
YALE_STATE_ARM_PARTIAL: STATE_ALARM_ARMED_HOME,
|
|
YALE_STATE_ARM_FULL: STATE_ALARM_ARMED_AWAY,
|
|
}
|