mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-07 17:34:42 +00:00
Brita script to pour water
This commit is contained in:
@@ -58,3 +58,4 @@ cards:
|
|||||||
- input_datetime.brita_next_change
|
- input_datetime.brita_next_change
|
||||||
- binary_sensor.brita_should_change_filter
|
- binary_sensor.brita_should_change_filter
|
||||||
- script.brita_new_filter
|
- script.brita_new_filter
|
||||||
|
- script.brita_pour_water
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ input_number:
|
|||||||
mode: box
|
mode: box
|
||||||
min: 0
|
min: 0
|
||||||
max: 150
|
max: 150
|
||||||
|
step: 0.5
|
||||||
|
icon: mdi:water
|
||||||
|
|
||||||
input_datetime:
|
input_datetime:
|
||||||
brita_next_change:
|
brita_next_change:
|
||||||
@@ -24,6 +26,15 @@ binary_sensor:
|
|||||||
{{ states('input_number.brita_remaining_liters') | int < 3 or (as_timestamp(next_change) - as_timestamp(now())) / (3600*24) | round(0) < 3 }}
|
{{ states('input_number.brita_remaining_liters') | int < 3 or (as_timestamp(next_change) - as_timestamp(now())) / (3600*24) | round(0) < 3 }}
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
brita_pour_water:
|
||||||
|
alias: Brita · Pour water
|
||||||
|
icon: mdi:cup-water
|
||||||
|
sequence:
|
||||||
|
- service: input_number.set_value
|
||||||
|
entity_id: input_number.brita_remaining_liters
|
||||||
|
data_template:
|
||||||
|
value: "{{ states('input_number.brita_remaining_liters') | float - 1.5 }}"
|
||||||
|
|
||||||
brita_new_filter:
|
brita_new_filter:
|
||||||
alias: Brita · New filter
|
alias: Brita · New filter
|
||||||
icon: mdi:filter-plus-outline
|
icon: mdi:filter-plus-outline
|
||||||
|
|||||||
Reference in New Issue
Block a user