Two doors, turn light on not being accurate

I have two garage doors (cover) which I want to turn on a lightbulb when they are open. This seems easy at first, but:

  1. Door 1 and Door 2 are open: light is on
  2. Door 1 closes: light turns off even though door 2 is still open.

Thoughts on how to have the light turn on and stay on if any of the doors state is open?

what about showing us what you have done so far

dont forget the formating bro

here is Mine

- id: 'Garage Door Open Lights ON'
  alias: Garage Door Open Lights ON
  initial_state: true
  trigger:
  - entity_id: binary_sensor.garage_door
    platform: state
    to: 'on'
    for: '00:00:02' # reason for this is wind blows the door a bit. 
  - entity_id: binary_sensor.garage_side_door
    platform: state
    to: 'on'
  condition:
  - condition: state
    entity_id: sensor.day_night
    state: Night
  - condition: state
    entity_id: light.garage
    state: 'off'
  action:
  - data:
      entity_id: light.garage
    service: light.turn_on
  - delay: 00:10:00
  - data:
      entity_id: light.garage
    service: light.turn_off

Then your automation to turn the light when door 1 closes needs a condition to test door 2.

It’s a simple node red automation. Just don’t know how to keep the light on when both doors are open then a door closes.

Any example with NR?

I think I may be all set. If I add both doors to a group in hassio, then use the state of the group that’ll accomplish when I’m looking for.

What you are trying to accomplish requires basic AND / OR logic gates. In NR you can install “node-red-contrib-bool-gate” from the pallete manager to use this option.

Example below is for an AND gate… just change the inputs to reflect your door sensor(s)

Screen Shot 2020-11-13 at 11.29.31 AM

[{"id":"f2e45728.5ec9a8","type":"and-gate","z":"25063fae.4f85f","name":"Example AND node ","rules":[{"t":"eq","v":"off","vt":"str","propertyType":"msg","property":"data","topic":"input_boolean.guest_mode"}],"outputTopic":"binary_sensor.ring_front_door_motion","gateType":"and","emitOnlyIfTrue":true,"x":1955.7142715454102,"y":1279.9999418258667,"wires":[["311f47d.dd460b8"]]},{"id":"bf8e01bd.ed04a","type":"debug","z":"25063fae.4f85f","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1890.0000190734863,"y":1221.428620815277,"wires":[]},{"id":"a316f1aa.84c45","type":"server-state-changed","z":"25063fae.4f85f","name":"Ring Front Door Motion","server":"8a3231e1.3f0e1","version":1,"entityidfilter":"binary_sensor.front_door_motion","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"$entity().state = \"on\" and (\t   $entities(\"sensor.iphoneexpress_zone\").state = \"home\" or $entities(\"sensor.garbineiphone_zone\").state = \"home\"\t)","halt_if_type":"jsonata","halt_if_compare":"jsonata","outputs":2,"output_only_on_state_change":true,"x":1695.7144317626953,"y":1287.1427993774414,"wires":[["bf8e01bd.ed04a","f2e45728.5ec9a8"],[]]},{"id":"7c4a5061.dab3a","type":"server-state-changed","z":"25063fae.4f85f","name":"Check if in Guest mode","server":"8a3231e1.3f0e1","version":1,"entityidfilter":"input_boolean.guest_mode","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":1555.357177734375,"y":1364.4644889831543,"wires":[["b3209a9.d25d968"]]},{"id":"b3209a9.d25d968","type":"change","z":"25063fae.4f85f","name":"msg.data","rules":[{"t":"move","p":"payload","pt":"msg","to":"data","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1766.607192993164,"y":1364.8216452598572,"wires":[["f2e45728.5ec9a8"]]},{"id":"311f47d.dd460b8","type":"debug","z":"25063fae.4f85f","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":2151.428779602051,"y":1281.4286003112793,"wires":[]},{"id":"8a3231e1.3f0e1","type":"server","name":"Hassio","legacy":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false}] ```

image

[{"id":"95553d54.f1eac","type":"trigger-state","z":"ffbd7f06.4a014","name":"","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"sensor.garage_door1, sensor.garage_door2","entityidfiltertype":"substring","debugenabled":false,"constraints":[{"targetType":"entity_id","targetValue":"sensor.garage_door1","propertyType":"current_state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"closed","propertyValue":"new_state.state"},{"targetType":"entity_id","targetValue":"sensor.garage_door2","propertyType":"current_state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"closed","propertyValue":"new_state.state"}],"outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":304,"y":1776,"wires":[["c77ef3e0.4f621"],["7c5c720e.c5419c"]]},{"id":"c77ef3e0.4f621","type":"debug","z":"ffbd7f06.4a014","name":"turn light off","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":614,"y":1776,"wires":[]},{"id":"7c5c720e.c5419c","type":"debug","z":"ffbd7f06.4a014","name":"turn light on","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":614,"y":1824,"wires":[]}]
1 Like

Sorry I didn’t see this was tagged node red. That puts me out of here. Simple automation in ha.