-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP Attempt to track HS2WD-E siren status. help needed #8834
base: master
Are you sure you want to change the base?
Conversation
The HS2WD-E does not report on its state. Attempts to track current state by tracking duration and siren mode/duraition
clearTimeout(globalStore.getValue(entity, 'state_timer')); | ||
globalStore.clearValue(entity, 'state_timer'); | ||
if (siren_on) { | ||
const duration = Math.min(values.duration, 240); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
240 is a placeholder for the actual max duration for now
That's fine
What is the use case for this? Do you want to publish siren OFF after a certain time? |
Yes, exactly . Not sure how other warning devices return their state, through ias Zone Status maybe, but this one doesn't return anything, which make it's use as an HA siren a bit tricky I wanted to copy the idea of the occupancy sensors that don't reset their state, but as those timers are created from within fromZigbee convertSet they have access to |
We have to add a |
The HS2WD-E siren does not report back its state.
As the siren command has a duration (and a max duration config) , it will stop at some point, but the triggering system as no way to know that.
Attempts to track current state by looking at the mode, duration (and strobe) when the command is sent.
This is not ready to merge.
2 open questions :
convertSet
context with a delay ? there is no easypublish
available as in fromZigbeeconvert
meta
be the right place to turn on this virtual state ?