toblum / ESPTeamsPresence

Microsoft Teams presence light for ESP32
https://toblum.github.io/ESPTeamsPresence/
Mozilla Public License 2.0
127 stars 37 forks source link

Set leds offline when the hour is non-workable #36

Open rodritwm opened 1 year ago

rodritwm commented 1 year ago

hello is it possible to add a little function that gets the time and if the time is no between 9am and 18hs the leds are offline? Thanks!

toblum commented 1 year ago

Hi @rodritwm,

time controlled functions wouldn't be too easy because the ESP isn't aware of the time and has no built-in clock.

What do you want to accomplish? Setting your status to on-/offline at this times? This might be something you could accomplish using PowerAutomate. If you just want to turn the LEDs off, I would go with a simple time-controlled socket, because that would save also power.

Greetings Tobias

bertenvdb commented 1 month ago

Alternativly, you could get the time by doing a GET request on e.g. http://worldtimeapi.org/api/ip.