guerrerotook / securitas-direct-new-api

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

Different scan time when status is "Disarmed" #117

Open danise76 opened 1 year ago

danise76 commented 1 year ago

Could it be easy to set 2 SCAN_INTERVALS, one for the DISARMED status, and other when the alarm is active?

guerrerotook commented 1 year ago

Those are different topics. When arming and disarming I perform a call to the API every second to see if the pending operation has completed or not. So when you click on arming is blinking and during that time I do a request per second to see if the operation succeed or not.

What you asking about the SCAN_INTERNVALS is when you arm or disarm you alarm outside Home Assistant and you may arm you home but shows as disarm in HA until the next scan is performed.

danise76 commented 1 year ago

The idea was to not "flood/harm/disturb" the api with requested when the alarm is dissarmed, but do it more or less often to detect changes when it's armend in some mode, so you could see a triggered status even it's after x seconds since the real moment when it happened.