Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
home assistant covid tracker
cards:
- content: >-
# Quarantine-o-meter
The gauge meters display the amount of time spend at home in the last 7
days. Where Alex left the house (on average) {{
(states("sensor.quarantine_meter_alex_times_left")|int / 7) | round(1) }}
times per day and Cat {{
(states("sensor.quarantine_meter_cat_times_left")|int / 7) | round(1) }}
times per day.
type: markdown
- cards:
- entity: sensor.quarantine_meter_alex
max: 100
min: 0
name: Alex Home %
severity:
green: 95
red: 0
yellow: 80
theme: Backend-selected
type: gauge
- entity: sensor.quarantine_meter_cat
max: 100
min: 0
name: Cat Home %
severity:
green: 95
red: 0
yellow: 80
theme: Backend-selected
type: gauge
type: horizontal-stack
type: vertical-stack
## covid
- platform: history_stats
name: Quarantine meter Alex
entity_id: person.alex
state: "home"
type: ratio
duration:
days: 7
end: "{{ now() }}"
- platform: history_stats
name: Quarantine meter Cat
entity_id: person.cat
state: "home"
type: ratio
duration:
days: 7
end: "{{ now() }}"
- platform: history_stats
name: Quarantine meter Alex times left
entity_id: person.alex
state: "home"
type: count
duration:
days: 7
end: "{{ now() }}"
- platform: history_stats
name: Quarantine meter Cat times left
entity_id: person.cat
state: "home"
type: count
duration:
days: 7
end: "{{ now() }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.