Skip to content

Instantly share code, notes, and snippets.

@sstratoti
Last active May 10, 2022 18:01
Show Gist options
  • Save sstratoti/6ab855ee2ee43f2c76c9a1dca0aec531 to your computer and use it in GitHub Desktop.
Save sstratoti/6ab855ee2ee43f2c76c9a1dca0aec531 to your computer and use it in GitHub Desktop.
- cards:
- entity: input_boolean.manual_frankie_pill
template: dow_time_warning_card
variables:
var_dow: sensor.last_pill_day_of_week
var_time: sensor.last_pill_time
var_critical_input_boolean: input_boolean.frankie_needs_pill
var_warning_input_boolean: input_boolean.frankie_needs_pill_warning
triggers_update:
- sensor.last_pill_day_of_week
- sensor.last_pill_time
- input_boolean.frankie_needs_pill
- input_boolean.frankie_needs_pill_warning
type: custom:button-card
- entity: input_boolean.manual_frankie_fed
template: dow_time_warning_card
variables:
var_dow: sensor.last_fed_day_of_week
var_time: sensor.last_fed_time
var_critical_input_boolean: input_boolean.frankie_needs_food
var_warning_input_boolean: input_boolean.frankie_needs_food_warning
triggers_update:
- sensor.last_fed_day_of_week
- sensor.last_fed_time
- input_boolean.frankie_needs_food
- input_boolean.frankie_needs_food_warning
type: custom:button-card
- entity: input_boolean.manual_frankie_walked
template: dow_time_warning_card
variables:
var_dow: sensor.last_walk_day_of_week
var_time: sensor.last_walk_time
var_critical_input_boolean: input_boolean.frankie_needs_walk
var_warning_input_boolean: input_boolean.frankie_needs_walk_warning
triggers_update:
- sensor.last_walk_day_of_week
- sensor.last_walk_time
- input_boolean.frankie_needs_walk
- input_boolean.frankie_needs_walk_warning
type: custom:button-card
- entity: input_boolean.manual_ruka_pill
template: dow_time_warning_card
variables:
var_dow: sensor.ruka_last_pill_day_of_week
var_time: sensor.ruka_last_pill_time
var_critical_input_boolean: input_boolean.ruka_needs_pill
var_warning_input_boolean: input_boolean.ruka_needs_pill_warning
triggers_update:
- sensor.ruka_last_pill_day_of_week
- sensor.ruka_last_pill_time
- input_boolean.ruka_needs_pill
- input_boolean.ruka_needs_pill_warning
type: custom:button-card
type: horizontal-stack
@sstratoti
Copy link
Author

Here is the hourly check against the date/time to see if a warning is displayed or if a pill is needed:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment