klogg
(Klogg)
March 8, 2019, 9:23am
1
Is it me or is this simple sensor incredibly confusing?
Firstly, why call it tod
? What would have been wrong with the much more descriptive times_of_day
?
Also, I find the naming of the configuration variables to be non intuitive to say the least…
before - surely it should be start or at ?
after - surely it should be end or to ?
(with before_offset
and after_offset
renamed accordingly)
Unless if course it is just me
1 Like
lolouk44
(lolouk44)
March 8, 2019, 9:39am
2
oh no, That calls for another breaking change !
I get what you say though and agree with your comments.
klogg
(Klogg)
March 8, 2019, 9:43am
3
Ha! yes. You don’t get much more breaking than changing the sensor name and it’s configuration variables
I say let’s do it (but let’s wait a few months for best effect!)
1 Like
quentinsf
(Quentin Stafford-Fraser)
March 8, 2019, 9:50am
4
Yes, I agree - the sensor’s a good idea, but all of those suggestions would make it a better one. Needs to be done ASAP before it becomes too popular!
I haven’t looked at submitting changes to the core - I guess there’s a pull request process…
GleDel
(Gle Del)
March 8, 2019, 9:53am
5
I think I’m sticking with my own sensor for now.
klogg
(Klogg)
March 8, 2019, 9:55am
6
Yeah… I have my own too. I wanted to change but gave up trying to work out how to use this new one. It wasn’t worth the effort for something so simple. Which is a shame.
jimbob1001
(Jimbob100101)
April 20, 2019, 8:07am
7
I totally agree, it is unnecessarily confusing.
Consider the following setup…
- platform: tod
name: "TOD Dawn"
after: sunrise
after_offset: '-01:00:00'
before: sunrise
before_offset: '01:00:00'
After sunrise with an offset of minus one hour? But isn’t that before sunrise?!
And before sunrise with an offset of plus one hour? Well that’s actually after sunrise isn’t it?
It messes with my head! Surely something like the following would be more appropriate…
- platform: tod
name: "TOD Dawn"
turn_on: sunrise
offset: '-01:00:00'
turn_off: sunrise
offset: '01:00:00'
klogg
(Klogg)
April 20, 2019, 8:12am
8
It looks like we’re* stuck with it as it is unless they decided to…
*I use the term loosely because as I said I chose not to use it.