Hi I have two garage doors. Both have myq garage doors that are integrated into Home Assistant and I can close and open them.
My goal which I’ve failed a couple times is to
turn on an led light when one or both garage doors is open as a visual que within my house.
I would like to turn the light off when one or both of my garage doors is closed.
I’ve been trying to use the Home Assistant UI to accomplish this but I can’t get it to consistently work.
I can get the lights to come on and turn off 80% of the time but not consistant.
My rules are
when garage door a is open then turn on light
when garage door b is open then turn on light
when garage door a is closed AND garage door b is closed turn off the light
when garage door b is closed AND garage door a is closed turn off the light.
Any chance Garage Door A is more reliable? The issue i mentioned would only apply to Garage door B (the actual cover entity)
I would try opening and closing Door B while on the developer tools > states page and see if the door goes from closed > opening > open and vice versa for closing.
This uses the correct state values for a binary_sensor, namely on and off.
trigger:
entity_id: binary_sensor.wyzesense_77a1ddff
from: 'off'
platform: state
to: 'on'
This is wrong:
trigger:
entity_id: binary_sensor.wyzesense_77a1e62d
from: open
platform: state
to: closed
Change open to 'on' and ‘closed’ to 'off'
A binary_sensor with a device_class set to door will present its state in the UI as open or closed. However, that’s just for presentation purposes. The binary_sensor’s state values are always on and off.
There may be other errors as well but that one definitely prevents the automation for Garage Door B from working properly.
Also, as per Bartem’s suggestion, please format the code. Two ways to do it:
Select the code and then click the </> icon in the menu bar.
or
Type three consecutive back-quotes ``` on a separate line before the code.
Type three more back-quotes on a separate line after the code.