I’d like to make a binary sensor on my Wemos D1 Mini, which is based on state of 2 GPIO port (D6 and D7). If both of them are FALSE then the template sensor has to be TRUE, in any other case it has to be FALSE. Can anybody help how to code this?
To be more accurate I have these 2 binary sensors:
- platform: gpio
name: "Gate totally opened"
id: "gate_totally_opened"
pin:
number: D6
inverted: true
mode:
input: true
pullup: true
- platform: gpio
name: "Gate totally closed"
id: "gate_totally_closed"
pin:
number: D7
inverted: true
mode:
input: true
pullup: true
And I’d like to have a third binary sensor which is ON (TRUE) it is not “totally open” or “totally closed”. This binary sensor would be “partially open”.