add home assistant configuration guidelines
This commit is contained in:
167
hass_trackers/fridge.txt
Normal file
167
hass_trackers/fridge.txt
Normal file
@@ -0,0 +1,167 @@
|
||||
|
||||
Counters:
|
||||
|
||||
```yaml
|
||||
days_since_fridge_filter_replaced:
|
||||
name: days_since_fridge_filter_replaced
|
||||
restore: true
|
||||
initial: 0
|
||||
step: 1
|
||||
icon: mdi:fridge
|
||||
last_non_zero_days_since_fridge_filter_replaced:
|
||||
name: last_non_zero_days_since_fridge_filter_replaced
|
||||
restore: true
|
||||
initial: 0
|
||||
step: 1
|
||||
icon: mdi:fridge
|
||||
```
|
||||
|
||||
Input Buttons:
|
||||
|
||||
```yaml
|
||||
reset_days_since_fridge_filter_replaced:
|
||||
name: reset_days_since_fridge_filter_replaced
|
||||
icon: mdi:fridge
|
||||
undo_reset_days_since_fridge_filter_replaced:
|
||||
name: undo_reset_days_since_fridge_filter_replaced
|
||||
icon: mdi:undo
|
||||
```
|
||||
|
||||
Automations:
|
||||
|
||||
```yaml
|
||||
- alias: 'Counter: Increment days_since_fridge_filter_replaced'
|
||||
description: ''
|
||||
trigger:
|
||||
- platform: time
|
||||
at: 00:00:00
|
||||
condition: []
|
||||
action:
|
||||
- service: counter.increment
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: counter.days_since_fridge_filter_replaced
|
||||
mode: single
|
||||
- alias: 'Counter: Reset days_since_fridge_filter_replaced'
|
||||
description: ''
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_button.reset_days_since_fridge_filter_replaced
|
||||
condition: []
|
||||
action:
|
||||
- service: counter.reset
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: counter.days_since_fridge_filter_replaced
|
||||
mode: single
|
||||
- alias: 'Counter: Update last_non_zero_days_since_fridge_filter_replaced'
|
||||
description: ''
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- counter.days_since_fridge_filter_replaced
|
||||
condition:
|
||||
- condition: numeric_state
|
||||
entity_id: counter.days_since_fridge_filter_replaced
|
||||
above: 0
|
||||
action:
|
||||
- service: counter.increment
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: counter.last_non_zero_days_since_fridge_filter_replaced
|
||||
mode: single
|
||||
- alias: 'Counter: Reset last_non_zero_days_since_fridge_filter_replaced'
|
||||
description: ''
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id:
|
||||
- counter.days_since_fridge_filter_replaced
|
||||
above: 0
|
||||
below: 2
|
||||
condition: []
|
||||
action:
|
||||
- service: counter.reset
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: counter.last_non_zero_days_since_fridge_filter_replaced
|
||||
- service: counter.increment
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: counter.last_non_zero_days_since_fridge_filter_replaced
|
||||
mode: single
|
||||
- alias: 'Counter: Undo Reset days_since_fridge_filter_replaced'
|
||||
description: ''
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_button.undo_reset_days_since_fridge_filter_replaced
|
||||
condition:
|
||||
- condition: numeric_state
|
||||
entity_id: counter.days_since_fridge_filter_replaced
|
||||
below: 1
|
||||
action:
|
||||
- service: counter.set_value
|
||||
metadata: {}
|
||||
data:
|
||||
value: "{{ int(states('counter.last_non_zero_days_since_fridge_filter_replaced'))}}"
|
||||
target:
|
||||
entity_id: counter.days_since_fridge_filter_replaced
|
||||
- service: counter.decrement
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: counter.last_non_zero_days_since_fridge_filter_replaced
|
||||
mode: single
|
||||
```
|
||||
|
||||
Dashboard:
|
||||
|
||||
```yaml
|
||||
title: Days Since Fridge Filter Replaced
|
||||
type: grid
|
||||
square: false
|
||||
columns: 1
|
||||
cards:
|
||||
- type: grid
|
||||
square: false
|
||||
columns: 2
|
||||
cards:
|
||||
- name: Reset
|
||||
show_name: true
|
||||
show_icon: true
|
||||
type: button
|
||||
tap_action:
|
||||
action: toggle
|
||||
entity: input_button.reset_days_since_fridge_filter_replaced
|
||||
show_state: true
|
||||
- name: Undo
|
||||
show_name: true
|
||||
show_icon: true
|
||||
type: button
|
||||
tap_action:
|
||||
action: toggle
|
||||
entity: input_button.undo_reset_days_since_fridge_filter_replaced
|
||||
show_state: true
|
||||
- type: grid
|
||||
square: false
|
||||
columns: 2
|
||||
cards:
|
||||
- type: entity
|
||||
entity: counter.days_since_fridge_filter_replaced
|
||||
state_color: false
|
||||
name: Days Since
|
||||
- type: entity
|
||||
entity: counter.last_non_zero_days_since_fridge_filter_replaced
|
||||
state_color: false
|
||||
name: Last Value
|
||||
- type: history-graph
|
||||
hours_to_show: 72
|
||||
entities:
|
||||
- counter.days_since_fridge_filter_replaced
|
||||
```
|
||||
167
hass_trackers/litterbox.txt
Normal file
167
hass_trackers/litterbox.txt
Normal file
@@ -0,0 +1,167 @@
|
||||
|
||||
Counters:
|
||||
|
||||
```yaml
|
||||
days_since_litter_box_changed:
|
||||
name: days_since_litter_box_changed
|
||||
restore: true
|
||||
initial: 0
|
||||
step: 1
|
||||
icon: mdi:cat
|
||||
last_non_zero_days_since_litter_box_changed:
|
||||
name: last_non_zero_days_since_litter_box_changed
|
||||
restore: true
|
||||
initial: 0
|
||||
step: 1
|
||||
icon: mdi:undo
|
||||
```
|
||||
|
||||
Input Buttons:
|
||||
|
||||
```yaml
|
||||
reset_days_since_litter_box_changed:
|
||||
name: reset_days_since_litter_box_changed
|
||||
icon: mdi:cat
|
||||
undo_reset_days_since_litter_box_changed:
|
||||
name: undo_reset_days_since_litter_box_changed
|
||||
icon: mdi:undo
|
||||
```
|
||||
|
||||
Automations:
|
||||
|
||||
```yaml
|
||||
- alias: 'Counter: Increment days_since_litter_box_changed'
|
||||
description: ''
|
||||
trigger:
|
||||
- platform: time
|
||||
at: 00:00:00
|
||||
condition: []
|
||||
action:
|
||||
- service: counter.increment
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: counter.days_since_litter_box_changed
|
||||
mode: single
|
||||
- alias: 'Counter: Reset days_since_litter_box_changed'
|
||||
description: ''
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_button.reset_days_since_litter_box_changed
|
||||
condition: []
|
||||
action:
|
||||
- service: counter.reset
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: counter.days_since_litter_box_changed
|
||||
mode: single
|
||||
- alias: 'Counter: Update last_non_zero_days_since_litter_box_changed'
|
||||
description: ''
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- counter.days_since_litter_box_changed
|
||||
condition:
|
||||
- condition: numeric_state
|
||||
entity_id: counter.days_since_litter_box_changed
|
||||
above: 0
|
||||
action:
|
||||
- service: counter.increment
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: counter.last_non_zero_days_since_litter_box_changed
|
||||
mode: single
|
||||
- alias: 'Counter: Reset last_non_zero_days_since_litter_box_changed'
|
||||
description: ''
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id:
|
||||
- counter.days_since_litter_box_changed
|
||||
above: 0
|
||||
below: 2
|
||||
condition: []
|
||||
action:
|
||||
- service: counter.reset
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: counter.last_non_zero_days_since_litter_box_changed
|
||||
- service: counter.increment
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: counter.last_non_zero_days_since_litter_box_changed
|
||||
mode: single
|
||||
- alias: 'Counter: Undo Reset days_since_litter_box_changed'
|
||||
description: ''
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_button.undo_reset_days_since_litter_box_changed
|
||||
condition:
|
||||
- condition: numeric_state
|
||||
entity_id: counter.days_since_litter_box_changed
|
||||
below: 1
|
||||
action:
|
||||
- service: counter.set_value
|
||||
metadata: {}
|
||||
data:
|
||||
value: "{{ int(states('counter.last_non_zero_days_since_litter_box_changed'))}}"
|
||||
target:
|
||||
entity_id: counter.days_since_litter_box_changed
|
||||
- service: counter.decrement
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
entity_id: counter.last_non_zero_days_since_litter_box_changed
|
||||
mode: single
|
||||
```
|
||||
|
||||
Dashboard:
|
||||
|
||||
```yaml
|
||||
title: REPLACE ME
|
||||
type: grid
|
||||
square: false
|
||||
columns: 1
|
||||
cards:
|
||||
- type: grid
|
||||
square: false
|
||||
columns: 2
|
||||
cards:
|
||||
- show_name: true
|
||||
show_icon: true
|
||||
type: button
|
||||
tap_action:
|
||||
action: toggle
|
||||
entity: input_button.reset_days_since_litter_box_changed
|
||||
show_state: true
|
||||
name: Reset
|
||||
- show_name: true
|
||||
show_icon: true
|
||||
type: button
|
||||
tap_action:
|
||||
action: toggle
|
||||
entity: input_button.undo_reset_days_since_litter_box_changed
|
||||
show_state: true
|
||||
name: Undo
|
||||
- type: grid
|
||||
square: false
|
||||
columns: 2
|
||||
cards:
|
||||
- type: entity
|
||||
entity: counter.days_since_litter_box_changed
|
||||
state_color: false
|
||||
name: Days Since
|
||||
- type: entity
|
||||
entity: counter.last_non_zero_days_since_litter_box_changed
|
||||
state_color: false
|
||||
name: Last Value
|
||||
- type: history-graph
|
||||
hours_to_show: 72
|
||||
entities:
|
||||
- counter.days_since_litter_box_changed
|
||||
```
|
||||
Reference in New Issue
Block a user