guerrerotook / securitas-direct-new-api

This repository contains the new securitas direct API that can be integrated in Home Assistant
Apache License 2.0
73 stars 30 forks source link

v2.7.4.0 dosen't trigger alarm. I revert to v2.7.3.0 and it works #214

Closed OkOtChA666 closed 5 months ago

OkOtChA666 commented 5 months ago

Didn't do much testing. But can confirm after instalation I cannot trigger alarm (no messages or errors)

However, Home assistants displays a message that Securitas Alarm cannot be configured throuhg YAML.

edurenye commented 5 months ago

I got the same error after updating to v2.7.4.0. From the log:

Log details (ERROR)
Logger: homeassistant.setup
Source: setup.py:280
First occurred: February 28, 2024 at 7:10:19 PM (1 occurrences)
Last logged: February 28, 2024 at 7:10:19 PM

The 'securitas' integration does not support YAML setup, please remove it from your configuration
TheGui01 commented 5 months ago

Same issue here. Reverted to 2.7.3

guerrerotook commented 5 months ago

Yes, this is the issue.

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 240, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2279, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2316, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 892, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 962, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/securitas/alarm_control_panel.py", line 296, in async_alarm_arm_away
    await self.set_arm_state(STATE_ALARM_ARMED_AWAY)
  File "/config/custom_components/securitas/alarm_control_panel.py", line 277, in set_arm_state
    arm_status.operation_status,
    ^^^^^^^^^^
UnboundLocalError: cannot access local variable 'arm_status' where it is not associated with a value
cantupaz commented 5 months ago

I know how to fix the UnboundLocalError (sorry, it's a dumb mistake).

But can someone tell me how to replicate the problem of the integration not supporting yaml? preferably with an example yaml, please.

edurenye commented 5 months ago

@cantupaz Here you have the example from the readme file:

securitas:
  username: !secret securitas_direct_username
  password: !secret securitas_direct_password
  code: !secret securitas_direct_code
  country: ES
  check_alarm_panel: false # defaultValue:True | set to false for NOT to check the alarm each time. See features.

You need to add this to the configuration.yaml file.

cantupaz commented 5 months ago

Thank you. I think I see the problem.

guerrerotook commented 5 months ago

I'm going to remove the yaml example now that the integration support config flow

TheGui01 commented 5 months ago

Hi @guerrerotook @cantupaz Here still the issue ith 2.7.4.1 Even after full uninstallation and reinstall Control Panel is not taking in account any action

guerrerotook commented 5 months ago

What do you mean by that? Do you have any log or error?

TheGui01 commented 5 months ago

What do you mean by that? Do you have any log or error?

From here : Screenshot_20240301_211931_Home Assistant.jpg

Button are like not active. By clicking on them, each button switches in gray so interfzce get the action, but there not any action behind.

zav13r commented 5 months ago

I can confirm the same as TheGui01. Integration and entities load, but nothing changes in alarm status - arming and disarming does not work (confirmed in securitas app)

TheGui01 commented 4 months ago

@guerrerotook thus can you please reopen this issue or shall we create a new one ?

TheGui01 commented 4 months ago

@cantupaz maybe you can help ?

OkOtChA666 commented 4 months ago

No worries, take your time.... Will stick to the v2.7.3.0

OkOtChA666 commented 4 months ago

Any updates on this? EDIT: Just realised it is closed