Hello
I would like certain sensors such as door or window sensors to be used as occupancy sensors. If, for example, a window opens or closes, that is indicative that someone is in that room. I think it could be a good complement to motion sensors since these only detect movement if it is evident and could be complemented with other sensors that, although they are not motion sensors, their use necessarily implies that there is someone in that room. I am currently doing it by hand, I leave you an example:
- trigger:
- platform: state
entity_id: binary_sensor.lumi_lumi_sensor_magnet_aq2_06a64e04_on_off
from: 'on'
to: 'off'
- platform: state
entity_id: binary_sensor.lumi_lumi_sensor_magnet_aq2_06a64e04_on_off
from: 'off'
to: 'on'
binary_sensor:
- name: "Puerta terraza occupancy"
unique_id: "puerta_terraza_occupancy"
device_class: "occupancy"
auto_off: 10
state: "true"