eavanvalkenburg / sia

SIA alarm systems integration into Home Assistant
MIT License
48 stars 11 forks source link

Power sensor #40

Closed sakalauskas closed 3 years ago

sakalauskas commented 3 years ago

Getting lots of electric power cuts this winter so decided that I should automate a few things since I could get this info from the alarm system.

Instead of AT/AR statuses being saved as the last message, it will save the state as a binary sensor. Heartbeat isn’t incredibly useful sensor.

eavanvalkenburg commented 3 years ago

This looks good, thanks for the addition!

One question, I haven't really looked at those messages, so are they also sent without a zone, similar to the RP messages?

sakalauskas commented 3 years ago

@eavanvalkenburg Yes, they are sent as zone = 0

After tinkering for a bit I found that after the home assistant restart, the state isn't restored/retrieved (remains Unknown). I do not have the smoke/water sensors yet but I assume that is the same?

I think that's kind of "okay" since with these sensors we'd mostly be interested when fire starts/water leaks/power goes out.

eavanvalkenburg commented 3 years ago

Yeah, since those sensors are indeed driven just by a event coming in, they remain unknown until the first time they are called, after that it should pull the previous state out of storage after a reboot. Could you redo this PR against the beta branch?

sakalauskas commented 3 years ago

@eavanvalkenburg thanks, done!

eavanvalkenburg commented 3 years ago

Just released it in the pre-release channel under v0.3.11beta-3!