Move door open counters to actual counters #184
This commit is contained in:
@ -2764,14 +2764,13 @@
|
||||
value: '{{ states(''input_number.tomorrow_corrected_high_temp'') | int }}'
|
||||
target:
|
||||
entity_id: input_number.today_corrected_high_temp
|
||||
- service: input_number.set_value
|
||||
- service: counter.reset
|
||||
target:
|
||||
entity_id:
|
||||
- input_number.back_door_opened_today
|
||||
- input_number.front_door_opened_today
|
||||
- input_number.basement_studio_door_opened_today
|
||||
data:
|
||||
value: 0
|
||||
- counter.back_door_opened_today
|
||||
- counter.front_door_opened_today
|
||||
- counter.basement_studio_door_opened_today
|
||||
data: {}
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: audible-off
|
||||
|
@ -20,29 +20,6 @@ input_boolean:
|
||||
name: Away Mode Skipped
|
||||
icon: mdi:debug-step-over
|
||||
|
||||
input_number:
|
||||
front_door_opened_today:
|
||||
name: Front Door Opened Today
|
||||
min: 0
|
||||
max: 200
|
||||
step: 1
|
||||
unit_of_measurement: times
|
||||
icon: mdi:door-open
|
||||
back_door_opened_today:
|
||||
name: Back Door Opened Today
|
||||
min: 0
|
||||
max: 200
|
||||
step: 1
|
||||
unit_of_measurement: times
|
||||
icon: mdi:door-open
|
||||
basement_studio_door_opened_today:
|
||||
name: Basement Studio Door Opened Today
|
||||
min: 0
|
||||
max: 200
|
||||
step: 1
|
||||
unit_of_measurement: times
|
||||
icon: mdi:door-open
|
||||
|
||||
proximity:
|
||||
home_tony:
|
||||
devices:
|
||||
@ -391,39 +368,6 @@ template:
|
||||
states.person.kallen_stork,
|
||||
] %}
|
||||
{{ people | selectattr('state','ne','home') | list | count }}
|
||||
- unique_id: 6a8bb32e-5f4e-4d1f-8e17-77f07e5b174a
|
||||
name: "Front Door Opened Today"
|
||||
unit_of_measurement: 'times'
|
||||
state: >-
|
||||
{{ states('input_number.front_door_opened_today') | int }}
|
||||
icon: >-
|
||||
{% if states('input_number.front_door_opened_today') | int > 0 %}
|
||||
mdi:door-open
|
||||
{% else %}
|
||||
mdi:door-closed
|
||||
{% endif %}
|
||||
- unique_id: 77786cc9-64de-4035-a635-e831a3b0ef63
|
||||
name: "Back Door Opened Today"
|
||||
unit_of_measurement: 'times'
|
||||
state: >-
|
||||
{{ states('input_number.back_door_opened_today') | int }}
|
||||
icon: >-
|
||||
{% if states('input_number.back_door_opened_today') | int > 0 %}
|
||||
mdi:door-open
|
||||
{% else %}
|
||||
mdi:door-closed
|
||||
{% endif %}
|
||||
- unique_id: 3d74efd0-2df5-438e-a015-26ac1ce2c4ee
|
||||
name: "Basement Studio Door Opened Today"
|
||||
unit_of_measurement: 'times'
|
||||
state: >-
|
||||
{{ states('input_number.basement_studio_door_opened_today') | int }}
|
||||
icon: >-
|
||||
{% if states('input_number.basement_studio_door_opened_today') | int > 0 %}
|
||||
mdi:door-open
|
||||
{% else %}
|
||||
mdi:door-closed
|
||||
{% endif %}
|
||||
|
||||
mqtt:
|
||||
sensor:
|
||||
|
@ -125,16 +125,16 @@
|
||||
"In case you had a burning desire to know, ",
|
||||
"Since I know everyone lays awake at night wondering the answer to this question, ",
|
||||
] | random }}
|
||||
{% if (states('sensor.front_door_opened_today') | int) > 0 %}
|
||||
"Today, the front door was opened {{ states('sensor.front_door_opened_today') }} times. "
|
||||
{% if (states('counter.front_door_opened_today') | int) > 0 %}
|
||||
"Today, the front door was opened {{ states('counter.front_door_opened_today') }} times. "
|
||||
{% else %}
|
||||
"Today, the front door was never opened at all. Wow, did you people seriously not go anywhere? "
|
||||
{% endif %}
|
||||
{% if (states('sensor.back_door_opened_today') | int) > 0 %}
|
||||
{% if (states('sensor.back_door_opened_today') | int) == 1 %}
|
||||
{% if (states('counter.back_door_opened_today') | int) > 0 %}
|
||||
{% if (states('counter.back_door_opened_today') | int) == 1 %}
|
||||
"And in a rare and shocking incident, the back door was also opened today! But only just once. There's no telling what could happen otherwise! "
|
||||
{% else %}
|
||||
"In what has to be considered a near catastrophic incident, the back door was opened multiple times today! {{ states('sensor.back_door_opened_today') }} times, to be precise! "
|
||||
"In what has to be considered a near catastrophic incident, the back door was opened multiple times today! {{ states('counter.back_door_opened_today') }} times, to be precise! "
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</p>
|
||||
|
Reference in New Issue
Block a user