Skip to content

Handle empty alarm list#22

Open
EmTeedee wants to merge 1 commit into
TKnpl:mainfrom
EmTeedee:handle-empty-alarm-list
Open

Handle empty alarm list#22
EmTeedee wants to merge 1 commit into
TKnpl:mainfrom
EmTeedee:handle-empty-alarm-list

Conversation

@EmTeedee

Copy link
Copy Markdown

Hi,

I am an unprivileged user, so as soon as alarms are closed, I don't see anything about them anymore.
The adapter didn't set alarm to false as expected.

A sample return from the API in this case:

Received data from Divera-API: {"success":true,"data":{"items":[],"sorting":[]},"ucr":123456}

The pull request handles an empty items list and just sets the alarm state to false.

nimda2 pushed a commit to nimda2/ioBroker.divera247 that referenced this pull request Jun 22, 2026
When the v2 alarms endpoint returns success but no active (non-archived)
alarm, reset the 'alarm' state to false and clear the internal tracking so
a previously triggered alarm does not stay stuck. Also warn when the API
responds with success=false.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant