Implement on_published callback for sensor #3378
Unanswered
blairfancy
asked this question in
Core functionality
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe your core improvement
Need a way to know if state of sensor has been published for exemple a on_piblished callback or variable publish_done.
Current limitations
When we build device for low consomption, we use deep sleep feature. But before entering deep sleep we need to be sure that all is published properly to avoid miss.
`
then:
- lambda: |-
id(door).publish_state(id(door).state);
- delay: 200ms --> this could be replaced by if condition binary_sensor.published: door)
- deep_sleep.enter:
id: ds
sleep_duration: ${sleep_interval}
`
Technical benefits
Will improve robustness for low consomption application.
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions