I’ve got a bunch of binary Sensors
- platform: tod
name: MORNING
after: "05:00"
before: sunrise
- platform: tod
name: DAY
after: sunrise
before_offset: "-01:00"
before: sunset
- platform: tod
name: EVENING
after: sunset
after_offset: "-01:00"
before: "22:00"
- platform: tod
name: LATEEVENING
after: "22:00"
before: "23:00"
- platform: tod
name: NIGHT
after: "23:00"
before: "05:00"
I’ve got automations that trigger of the change to DAY and to do something. Working well.
But I want to be able to evaluate “what is my current tod”. In my brain that needs to be a “thing” that I can ask is it DAY or is it MORNING.
I’ve tried putting them in a group:
times_of_day:
name: Times of Day
entities:
- binary_sensor.NIGHT
- binary_sensor.MORNING
- binary_sensor.DAY
- binary_sensor.EVENING
- binary_sensor.LATEEVENING
But I’m not sure thats what I want either. Ultimately I want to use these in a blueprint for heating (shamelessly pulled from : Home Assistant Blueprint For Heating (github.com) ) , so I can say, if DAY then here is a threshold to use for heating, if MORNING then here is a different threshold for heating.
Here’s the trigger part of the blueprint where i’m trying to evaluate for the user having selected binary_sensor.DAY that I’m in that time period.
trigger:
- platform: homeassistant
event: start
- platform: event
event_type: automation_reloaded
- platform: time_pattern
minutes: /1
action:
- choose:
- conditions:
- condition: numeric_state
entity_id: !input 'temp_sensor'
below: !input 'min_temp'
sequence:
- service: input_boolean.turn_on
target:
entity_id: !input 'heating'
default:
- service: input_boolean.turn_on
target:
entity_id: !input 'heating'
mode: single
Its the condition other than temperature I’m trying to figure out.