hass-aarlo
hass-aarlo copied to clipboard
aarlo.alarm_set_mode is broken
aarlo.alarm_set_mode is silently has no effect, as you imported two different DOMAIN (s) , where the 1st DOMAIN is the intended on as ALARM_DOMAIN and 2nd DOMAIN as aarlo is the one the has effect in alarm_mode_service function
from homeassistant.components.alarm_control_panel import (
DOMAIN,
FORMAT_NUMBER,
FORMAT_TEXT,
AlarmControlPanelEntity,
)
.
.
.
from .const import (
COMPONENT_ATTRIBUTION,
COMPONENT_BRAND,
COMPONENT_CONFIG,
COMPONENT_DATA,
COMPONENT_DOMAIN,
COMPONENT_SERVICES,
DOMAIN,
)
.
.
def alarm_mode_service(hass, call):
for entity_id in call.data["entity_id"]:
try:
mode = call.data["mode"]
get_entity_from_domain(hass, DOMAIN, entity_id).set_mode_in_ha(mode)
_LOGGER.info("{0} setting mode to {1}".format(entity_id, mode))
except HomeAssistantError:
_LOGGER.warning("{0} is not an aarlo alarm device".format(entity_id))
I also have this problem. Is there any way I can import this fix?
You can probably install from the pull request: https://github.com/twrecked/hass-aarlo/pull/582