Workday sensor

Anyone used the workday sensor yet (introduced in 0.41)?

The docs give the following example automation:

automation:
  alias: Turn on heater on workdays
  trigger:
    platform: time
    after: '08:00:00'
  condition:
    condition: state
    entity_id: 'binary_sensor.workday_sensor'
    state: 'off'
  action:
    service: switch.turn_on
    entity_id: switch.heater

It looks like this triggers only on NON workdays or am I missing something here?

Workday state = off. That looks like a non-workday to me.

There was an update for the example.

https://github.com/home-assistant/home-assistant.github.io/pull/2342

1 Like

I got this error:

17-04-10 01:43:14 ERROR (Thread-5) [homeassistant.components.binary_sensor.workday] There is no province/state TX in country US

My config:

binary_sensor:
  - platform: workday
    country: US
    province: TX

What did I do wrong? I followed the instruction on homeassistant.io page.

UPDATED: OK Iā€™m stupidā€¦ Thereā€™s no Province in US, duh!.. changed that to ā€œstateā€ and error is gone!!!