Hi,
I’d like to make a binary sensor that’s on from 22:00 to 08:00 everyday. However, I don’t even have a clue on where to start.
I know how to create binary sensors but I’m terrible at the whole time handling thing.
Can somebody help, please?
Hi,
I’d like to make a binary sensor that’s on from 22:00 to 08:00 everyday. However, I don’t even have a clue on where to start.
I know how to create binary sensors but I’m terrible at the whole time handling thing.
Can somebody help, please?
Have an automation turn it on at whatever time you want… And an automation turn it off at whatever time you want.
If having a binary sensor is the right way to do what you’re trying to achieve.
Create a Schedule helper instead.
If you must have a binary sensor, create a template binary sensor under Helpers, with a state template of:
{{ now().hour >= 22 or now().hour < 8 }}
Oh nice. Didn’t know about that helper. Thanks!