pnbruckner / ha-entity-tz

Home Assistant Entity Time Zone Sensor
The Unlicense
3 stars 0 forks source link

discussion: binaries reversed? #3

Closed Mariusthvdb closed 8 months ago

Mariusthvdb commented 8 months ago

Since you dont have Discussion enabled in the repo, please allow me here to open this discussion:

Working with your new integration for some time now, and it all works very nicely. thanks again for creating it in the first place.

There is 1 thing that I find myself doing, and it is keeping me from doing my former template sensors away.

In all of my logic, I test on being in the local time(zone) or being in homeland....

So, the reversed of what the current binary sensor entities test. I was wondering what you would think of reversing the logic to a more positive pov.

in_local_timezone in_home_country

or adding these ofc, to suit both needs

Scherm­afbeelding 2024-01-30 om 22 00 44

ofc, these templates are ok, but since we now have a dedicated integration doing the works for us, I figured it might be an interesting evolution to add this

pnbruckner commented 8 months ago

I'll have to think about this some more before deciding anything.

But my initial thoughts are the intention of the binary sensors was to indicate when someone is not "in country" or is in a different time zone. I.e., indicate when someone is "on travel" (either in a different country, or at least, in a different time zone.) I would think that is the more usual use case.

Having said that, the icons will show both states. E.g., for time zone: image vs image. So, except for the color of the icon, it shows both states. Maybe you can just disable showing state as color???

pnbruckner commented 8 months ago

Any thoughts on my comments? They're binary sensors, so you can easily test for either off or on, and like I said, the icons show both states, it might just be the coloring that you object to or want the other way. It would seem that would be easy enough to deal with, especially for someone like you that knows all the frontend tricks. 😉

Mariusthvdb commented 8 months ago

yes, its no issue at all, it was a point of view really.

sorry for not getting back on it, I got lost in debugging some core functionality.

Ill close, and thank you for your prompt reply (and polite nudge here ;-) )