WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Discussion options

You must be logged in to vote

Here's one approach. Just trigger off the MQTT message, and the task does a task.unique and then a task.wait_until until an hour before the school time (or skip if it's already less than an hour). After the task.wait_until it opens the shades. Each time you get a new MQTT update, the old task gets killed and replaced by the new one, which uses the potentially new time to do the next task.wait_until.

To make this only happen once per day, you'll also have to have a flag (eg, some state variable) that is set when the shades are auto-opened. Once the flag is set, the MQTT task trigger should be disabled by putting that condition in @state.active. You can reset the flag each morning with a fi…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@wsw70
Comment options

@craigbarratt
Comment options

@wsw70
Comment options

@dorbitbrown
Comment options

Answer selected by wsw70
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants