nielsfaber / alarmo

Easy to use alarm system integration for Home Assistant
1.24k stars 117 forks source link

Async_alarm_disarm() takes 1 positional argument but 2 were given #964

Closed jeroenterheerdt closed 3 weeks ago

jeroenterheerdt commented 3 weeks ago

Alarmo Version

v1.10.2

HA Version

2024.6.0

Bug description

Whenever you disarm an alarm the error shows up and the alarm doesn't disarm.

Steps to reproduce

Try to disarm the alarm manually or in an automation/script and see this error: AlarmoBaseEntity.async_alarm_disarm() takes 1 positional argument but 2 were given

Relevant log output

No response

YorkshireHillbilly commented 3 weeks ago

Updated Core to 2024.6.0 Updated Alarmo to v1.10.1 Issue resolved

jeroenterheerdt commented 3 weeks ago

I had to downgrade to v1.10.0 to resolve this issue.

nielsfaber commented 3 weeks ago

@jeroenterheerdt Can you share more information? I'm looking for the following:

Nocsaron commented 3 weeks ago

@jeroenterheerdt Can you share more information? I'm looking for the following:

  • How are you disarming? via a service call? via alarm panel card? via alarmo card? via MQTT?
  • What are you disarming? alarmo master entity or normal area entity?
  • What is exactly printed in the logs (including line numbers)?

I'm having the same issue to. I'm disarming via an alarmo card.

I updated to HA 2024.6.0 this morning at which point the error started occurring. I'm currently on Alarmo 1.9.10, which could be part of the problem.

Here are the log outputs (I'm on mobile so sorry for what I know is terrible formatting.

Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/commands.py:241 integration: Home Assistant WebSocket API (documentation, issues) First occurred: 7:53:24 AM (4 occurrences) Last logged: 12:56:16 PM

[140320813223792] Unexpected exception [140320769248416] Unexpected exception [140320596645712] Unexpected exception Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2741, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2784, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 977, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1049, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/alarm_control_panel/init.py", line 207, in async_handle_alarm_disarm await self.async_alarm_disarm(self.code_or_default_code(code)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: AlarmoBaseEntity.async_alarm_disarm() takes 1 positional argument but 2 were given

nielsfaber commented 3 weeks ago

@Nocsaron Please update to latest alarmo version before posting an issue.

PSfreak commented 3 weeks ago

I have the same issue, Alarmo 1.10.1 HA 2024.6.0 Error: AlarmoBaseEntity.async_alarm_disarm() takes 1 positional argument but 2 were given When i downgraded to HA 2024.5.5 everything worked again

nielsfaber commented 3 weeks ago

@PSfreak Please update to latest alarmo version before posting an issue.

PSfreak commented 3 weeks ago

@PSfreak Please update to latest alarmo version before posting an issue.

I dont have a update, where do i get it?

nielsfaber commented 3 weeks ago

@PSfreak the same way as all other updates, via HACS or here: https://github.com/nielsfaber/alarmo/releases

PSfreak commented 3 weeks ago

@PSfreak the same way as all other updates, via HACS or here: https://github.com/nielsfaber/alarmo/releases

Thanks, everything is working now. Info: I was not offered an update through HACS, but manual worked fine

jeroenterheerdt commented 3 weeks ago

@jeroenterheerdt Can you share more information? I'm looking for the following:

  • How are you disarming? via a service call? via alarm panel card? via alarmo card? via MQTT?

was disarming via service call, alarm panel card

  • What are you disarming? alarmo master entity or normal area entity?

master entity

  • What is exactly printed in the logs (including line numbers)?
Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:241
integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 7:53:24 AM (4 occurrences)
Last logged: 12:56:16 PM

[140320813223792] Unexpected exception
[140320769248416] Unexpected exception
[140320596645712] Unexpected exception
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2741, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2784, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 977, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1049, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/alarm_control_panel/init.py", line 207, in async_handle_alarm_disarm
await self.async_alarm_disarm(self.code_or_default_code(code))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: AlarmoBaseEntity.async_alarm_disarm() takes 1 positional argument but 2 were given

I have resolved this by downgrading to v.1.10.0

nielsfaber commented 3 weeks ago

@jeroenterheerdt Are you sure you updated to v1.10.2 (and restarted HA) when this error occurred? The error logging you shared suggests that you were running an older version. Could you please retry updating to the latest revision? Downgrading will not help tackling the issue.

jeroenterheerdt commented 3 weeks ago

updating to latest (again) seems to fix this. maybe some weird caching thing?

jeroenterheerdt commented 3 weeks ago

Turns out this was a core issue, not alarm https://github.com/home-assistant/core/pull/118961