Hi all,
this is my first post, so hopefully I do everything correct.
I’m trying to automate my physical mailbox and have added two doorsensors there.
The “mailbox_open” detects if the lid was opened to put something inside.
The “mailbox_emptied” detects if the mailbox-door was opened to clear it.
Important to know: To open the mailbox-door, you have to open the lid fist.
I tried to create a binary sensor “parcel delivered” which should become True when the lid is opened and stay true till the door was opened to empty the postbox.
I tried the following but the sensor is always false:
template:
- trigger:
- platform: state
entity_id:
- binary_sensor.lumi_lumi_sensor_magnet_aq2_opening #Briefkasten geoeffnet
- binary_sensor.lumi_lumi_sensor_magnet_aq2_opening_2 #Briefkasten geleert
to: 'on'
sensor:
- name: ParcelDelivered
state: "{{ (is_state('this', 'True') or is_state('binary_sensor.lumi_lumi_sensor_magnet_aq2_opening', 'off')) and is_state('binary_sensor.lumi_lumi_sensor_magnet_aq2_opening_2', 'off') }}"
Has anyone an idea what I’m doing wrong?