Very Silly Question
Very Silly Question
Do all Timed Devices Week States roll over at 00:00 on Sunday, regardless of when the timer device was created? I'm guessing the answer is yes, but just want to make sure. 
Re: Very Silly Question
So I guess to no ones surprise but me, the week for this device starts Monday morning at 00:00
I created a new Timed Device yesterday (Sunday), ran it for a short period of time and turned it off.
Today, Monday, if the week started on Sunday, I would expect to see the time from yesterday to be in the secondsThisWeek00 category, but because the week starts on Monday, they were rolled over into the secondsThisWeek01 category.
Just passing along info I'm guessing everyone already knows....
I created a new Timed Device yesterday (Sunday), ran it for a short period of time and turned it off.
Today, Monday, if the week started on Sunday, I would expect to see the time from yesterday to be in the secondsThisWeek00 category, but because the week starts on Monday, they were rolled over into the secondsThisWeek01 category.
Just passing along info I'm guessing everyone already knows....
- durosity
- Posts: 4810
- Joined: Thu May 10, 2012 3:21 pm
- Location: Newcastle Upon Tyne, Ye Ol' England.
Re: Very Silly Question
I love it when I see old topics picked up again like that!
Is that how you want it to work?
Is that how you want it to work?
Computer says no.
Re: Very Silly Question
The plugin just uses date.isocalendar() to determine when a new week starts. The ISO standard is for weeks to start on Monday:
https://docs.python.org/3/library/datet ... te-objects
Re: Very Silly Question
So I became aware of this a while ago, but just recently confirmed my suspicions. Totally understand how and why it works this way... but might be nice to be able to set the day you want the week to start on in the config.. or perhaps in the Device.
But also assume this would kind of be a massive undertaking to do... and just not really worth the effort.
Once I became aware of when the week starts, it was easy to get the info I needed in a way that made sense for me...
But also assume this would kind of be a massive undertaking to do... and just not really worth the effort.
Once I became aware of when the week starts, it was easy to get the info I needed in a way that made sense for me...