rainepretorius / olarm-ha-integration

Integration for Olarm devices created by a BSC(Computer Science and Mathematics) student.
https://raine.pretoriusse.net
BSD 2-Clause "Simplified" License
30 stars 13 forks source link

Utility keys are not able to be actioned #16

Closed jonathankretzmer closed 1 year ago

jonathankretzmer commented 1 year ago

My Paradox Evo setup has my gate and garage hooked up to Utility Keys 1 & 2 respectively. In the Olarm app I need only click on either of the buttons for it to signal to either to open. Has this been implemented in this integration yet?

When clicking on the buttons in the HA UI

image

I receive the following error:

2023-04-03 09:57:51.791 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140078706928288] 'UKeyButtonEntity' object has no attribute '_async_press_action'
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service
    await hass.services.async_call(
  File "/usr/lib/python3.10/site-packages/homeassistant/core.py", line 1808, in async_call
    task.result()
  File "/usr/lib/python3.10/site-packages/homeassistant/core.py", line 1845, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/lib/python3.10/site-packages/homeassistant/helpers/entity_component.py", line 213, in handle_service
    await service.entity_service_call(
  File "/usr/lib/python3.10/site-packages/homeassistant/helpers/service.py", line 686, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/lib/python3.10/site-packages/homeassistant/helpers/entity.py", line 961, in async_request_call
    await coro
  File "/usr/lib/python3.10/site-packages/homeassistant/helpers/service.py", line 718, in _handle_entity_call
    partial(getattr(entity, func), **data)  # type: ignore[arg-type]
AttributeError: 'UKeyButtonEntity' object has no attribute '_async_press_action'
rainepretorius commented 1 year ago

I will implement a fix for this asap.

jonathankretzmer commented 1 year ago

Many thanks :)

I don't have all that much experience with either Python or HA in particular, so my level of being able to contribute would be limited, possibly to minor bug fixes, etc.

rainepretorius commented 1 year ago

You are doing great. I found the issue, and it will be fixed in version 1.1.4 within the next week to a week and a half.

rainepretorius commented 1 year ago

THe issue has been fixed as of version 1.1.4.