i ran a test to see if V102 was working with my config and got the following error message:
Failed config
General Errors:
- Component error: securitas_direct - No module named ‘xmltodict’
I’m deferring the update of HASSIO…
This component is great, my wife has been using it a lot and she prefers Hassio to the Securitas app.
Fri Nov 22 2019 14:04:22 GMT+0100 (hora estándar de Europa central)
Error during setup of component securitas_direct
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/setup.py”, line 176, in _async_setup_component
component.setup, hass, processed_config # type: ignore
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/securitas_direct/init.py”, line 64, in setup
HUB.update_overview()
File “/usr/src/homeassistant/homeassistant/util/init.py”, line 240, in wrapper
result = method(*args, **kwargs)
File “/config/custom_components/securitas_direct/init.py”, line 107, in update_overview
self.overview = self.session.last_state()
File “/config/custom_components/securitas_direct/securitas.py”, line 111, in last_state
regs= res[‘PET’][‘LIST’][‘REG’]
KeyError: ‘REG’
@jezzard
Maybe the integration can fails with more than one home alarm. I cant test it, to work with multiple alarm. If you want, you could send me private message to debug how a multi-home account (more than one alarm) can work.
I have intended to get only the first alarm found, but maybe it can fails somewhere.
Error while setting up platform securitas_direct
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 150, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 442, in wait_for
return fut.result()
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/securitas_direct/alarm_control_panel.py”, line 41, in setup_platform
alarms.append(SecuritasAlarm())
TypeError: Can’t instantiate abstract class SecuritasAlarm with abstract methods supported_features
It seems last HA version breaks a lot of the alarms from custom components.
You can also check the same issue in the Alexa Media Player custom component post:
And also the Visonic component that I use:
By the way, the new custom component works as a charm… the only request I have (if possible) is to enable the repository to be added to HACS integration, that way we can update, downgrade or keep track of this component from there.
Question to all of you testers, how responsive is this?
Is it “sometimes instant sometimes 28 seconds” or it it “almost live”?
I’m asking since automations when entering the house and/or disarming is quite time sensitive. No one wants to wait 28 seconds for the light to turn on in the hallway
As the breaking change of 103 release on the alarm_control_panel impacted all projects based on such component I was able to find the fix in other component and applied that successfully to our Securitas one. Changes in “alarm_control_panel.py” are as follows:
Add inmediately below of the STATE_ALARM const import:
from homeassistant.components.alarm_control_panel.const import (
SUPPORT_ALARM_ARM_AWAY,
SUPPORT_ALARM_ARM_HOME,
SUPPORT_ALARM_ARM_NIGHT,
)
Add at the bottom:
@property
def supported_features(self) -> int:
"""Return the list of supported features."""
return SUPPORT_ALARM_ARM_HOME | SUPPORT_ALARM_ARM_AWAY | SUPPORT_ALARM_ARM_NIGHT
If you do not have a minimal code skill it is probably better to wait until our friend @segalion make the change in the code in github and you can download the fixed version.
I also vote for the inclussion of our Securitas component in HACS. Unfortunately now I do not have time to look to that and contribute.