Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ironicbadger
Created March 29, 2020 03:18
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ironicbadger/1a4504b3a23d9952cec0c61127b6ac4f to your computer and use it in GitHub Desktop.
Save ironicbadger/1a4504b3a23d9952cec0c61127b6ac4f to your computer and use it in GitHub Desktop.
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