Replace downstairs bathroom door sensor with motion sensor

This commit is contained in:
2023-11-03 17:44:40 -04:00
parent 18be9270c6
commit 288ced61e7
3 changed files with 3 additions and 24 deletions

View File

@ -2576,7 +2576,6 @@
- input_number.back_door_opened_today - input_number.back_door_opened_today
- input_number.front_door_opened_today - input_number.front_door_opened_today
- input_number.basement_studio_door_opened_today - input_number.basement_studio_door_opened_today
- input_number.downstairs_bathroom_door_opened_today
data: data:
value: 0 value: 0
- conditions: - conditions:

View File

@ -42,13 +42,6 @@ input_number:
step: 1 step: 1
unit_of_measurement: times unit_of_measurement: times
icon: mdi:door-open icon: mdi:door-open
downstairs_bathroom_door_opened_today:
name: Downstairs Bathroom Door Opened Today
min: 0
max: 200
step: 1
unit_of_measurement: times
icon: mdi:door-open
proximity: proximity:
home_tony: home_tony:
@ -247,7 +240,7 @@ template:
unique_id: fad33281-1c1a-4362-93e6-398334358027 unique_id: fad33281-1c1a-4362-93e6-398334358027
device_class: occupancy device_class: occupancy
state: > state: >
{{ is_state('light.downstairs_bathroom_lights','on') }} {{ is_state('timer.downstairs_bathroom_lights_timer','active') or is_state('binary_sensor.downstairs_bathroom_sensor_motion','on') }}
- sensor: - sensor:
- unique_id: people_at_home - unique_id: people_at_home
name: People at Home name: People at Home
@ -427,17 +420,6 @@ template:
{% else %} {% else %}
mdi:door-closed mdi:door-closed
{% endif %} {% endif %}
- unique_id: cdc850bc-3747-405d-8b16-3b79ba9fbc87
name: "Downstairs Bathroom Door Opened Today"
unit_of_measurement: 'times'
state: >-
{{ states('input_number.downstairs_bathroom_door_opened_today') | int }}
icon: >-
{% if states('input_number.downstairs_bathroom_door_opened_today') | int > 0 %}
mdi:door-open
{% else %}
mdi:door-closed
{% endif %}
mqtt: mqtt:
sensor: sensor:

View File

@ -179,15 +179,13 @@ template:
unit_of_measurement: 'open' unit_of_measurement: 'open'
state: >- state: >-
{% set doors = [ {% set doors = [
states.binary_sensor.basement_studio_door, states.binary_sensor.basement_studio_door
states.binary_sensor.downstairs_bathroom_door,
] %} ] %}
{% set doors_open = doors | selectattr('state','eq','on') | list | count %} {% set doors_open = doors | selectattr('state','eq','on') | list | count %}
{{ doors_open }} {{ doors_open }}
icon: >- icon: >-
{% set doors = [ {% set doors = [
states.binary_sensor.basement_studio_door, states.binary_sensor.basement_studio_door
states.binary_sensor.downstairs_bathroom_door,
] %} ] %}
{% set doors_open = doors | selectattr('state','eq','on') | list | count %} {% set doors_open = doors | selectattr('state','eq','on') | list | count %}
{% if doors_open == 0 %} {% if doors_open == 0 %}