Skip to content

feat: add support for variable sleep durations#45

Merged
lanrat merged 11 commits intolanrat:mainfrom
pimlie:feat-variable-sleep-duration
Aug 6, 2024
Merged

feat: add support for variable sleep durations#45
lanrat merged 11 commits intolanrat:mainfrom
pimlie:feat-variable-sleep-duration

Conversation

@pimlie
Copy link
Copy Markdown
Contributor

@pimlie pimlie commented Jul 20, 2024

This PR adds support to configure different sleep durations per day-of-week, hour and minute. It should basically support the most common configs as is described in hass.md, so instead of using home-assistant to keep changing the sleep duration it's just baked into the homeplate fw :)

  • see config_example.cpp for example config
  • I had to change the env's a little bit to be able to run the unit tests

@pimlie pimlie marked this pull request as draft July 20, 2024 14:20
@pimlie pimlie marked this pull request as ready for review July 20, 2024 15:25
Comment thread src/config_example.cpp Outdated
Copy link
Copy Markdown
Owner

@lanrat lanrat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the new feature! I left a few very minor nits.

Comment thread README.md
Comment thread README.md Outdated
Comment thread README.md Outdated
@pimlie pimlie requested a review from lanrat August 4, 2024 18:07
@lanrat
Copy link
Copy Markdown
Owner

lanrat commented Aug 6, 2024

Thanks for the PR and new feature!

@lanrat lanrat merged commit ea7d435 into lanrat:main Aug 6, 2024
@felixh10r
Copy link
Copy Markdown
Contributor

@pimlie @lanrat a quick heads-up because it took me a minute to find the problem: in config_example.h, sleep_duration.h was renamed to sleep_schedule.h but the file wasn't renamed. this line should be reverted, otherwise the correct file can't be found on build (i thought it's more elegant to amend the commit then to open a new PR—if i should, just say the word!)

@pimlie
Copy link
Copy Markdown
Contributor Author

pimlie commented Aug 18, 2024

@felixh10r Ah damn, sorry about that. It is probably easiest/best to create a new PR to fix that, feel free to do so!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants