Automation for Turning On Switch on Working Day

Hi All

New to home assistant automation. I am trying to automate the switch to turn on every day (Monday to Friday) at 7 am and hence using time as the trigger. My config for Trigger is below;

platform: time
at: ‘07:00:00’

And my Conditions are:

condition: time
after: ‘07:00:00’

  • mon
  • tue
  • wed
  • thu
  • fri

However, the switch doesn’t turn on. Checking the trace file, it shows “Triggered by the time”.
Feels like something is wrong with my condition logic.

Any help is appreciated.

You have trigger at 7 and condition after 7? You don’t need time in condition, just the day of the week, it seems.

You can also use the workday integration. It is a Boolean that makes the conditions cleaner. The following would go in your configuration.yaml.

  - platform: workday
    country: USA
    workdays: [mon, tue, wed, thu, fri]
    excludes: [sat, sun, holiday]


  - platform: time
    at: '07:00:00'
  - condition: state
    entity_id: binary_sensor.workday_sensor
    state: 'on'
1 Like

Thanks, I am in Australia, will it work?

It will, just specify the country you’re using. Details here:

It can’t be 7am and after 7am at the same time so simply remove the time condition for it to work as if it only triggers at exactly 7am there is no need for a further time condition, just remove time and leave the days.