fix: sleep duration again & send sleep duration to mqtt #53
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ok, third time is the charm 😞
This is starting to get embarrassing, but in my defense I didn't realize before I had configured my
TIME_TO_SLEEP_MIN
to 5 minutes and also configured the variable sleep duration's during the day to be 5 minutes. So while I was working on this during the day, it seemed it was using the correct sleep duration even though it was just using the default sleep :(As a similar issue could exists for other people when your configured time slots are f.e. not continuous, I realized it would be helpful to store the actual sleep duration as diagnostic in mqtt/hass so you can check it's correct even when you are normally sleeping.
I'll make this a draft pr for now and check tomorrow that it's actually fixed now...
fyi @felixh10r