Hi there,
I seem to be having an issue getting the workday sensor to work correctly(what I assume it’s intended to do).
I’m trying to set up an automation that has the workday binary sensor as a condition. (when the light switch is pushed and the light is on and it is a workday then turn off the light ). This is an working automation that breaks if I add the workday condition. By breaks I mean it doesn’t run at all.
What I have tried? Google, deleted a recreated the automation, changed the args for state and attribute(all choices on the dropdown), even set the conditions state to off, use UI to create automation, use yaml to create automation, validate configuration, and restarted home assistant and router many times tried all kinds of combos with this, created a custom binary_sensor.yaml ,even tried it with other automations, when i try to use it as a condition the automation stops working, tried using AND this didn’t work either. added sensor to Lovelace and checked the state in dev tools, it’s there and showing as ‘on’ state.
Info that might help:
Automation
alias: 'button turn off master light '
description: button turn on master light
trigger:
- platform: device
type: turned_off
device_id: ***7
entity_id: switch.three_way_switch_living_room_switch_2
domain: switch
condition:
- condition: device
type: is_on
device_id: ***8
entity_id: light.master_als09l
domain: light
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
attribute: workdays
action:
- type: turn_off
device_id: ***8
entity_id: light.master_als09l
domain: light
mode: restart
binary_sensor.yaml
#workday sensor
- platform: workday
country: ZA
workdays: [mon, tue, wed, thu, fri]
excludes: [sat, sun, holiday]
add_holidays:
- '2020-02-24'
configuration.yaml
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
#Include files here
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
binary_sensor: !include binary_sensor.yaml
Anyway, I’m sure it’s something small that I’m not aware of perhaps? Any help and suggestions will be greatly appreciated! If you need further info please ask.
Thanks in advance for all the help!