Refactor chore tracker: Update chore names and IDs for improved clarity and consistency
This commit is contained in:
@@ -198,8 +198,8 @@ switch:
|
||||
data:
|
||||
entity_id: switch.chore_tracker_jordyn_brush_teeth
|
||||
- platform: template
|
||||
name: "Jordyn - Check & fill water bowls"
|
||||
id: jordyn_check_&_fill_water_bowls
|
||||
name: "Jordyn - Fill water bowls"
|
||||
id: jordyn_fill_water_bowls
|
||||
icon: mdi:checkbox-marked-circle
|
||||
optimistic: true
|
||||
restore_mode: RESTORE_DEFAULT_OFF
|
||||
@@ -209,14 +209,14 @@ switch:
|
||||
- homeassistant.service:
|
||||
service: switch.turn_on
|
||||
data:
|
||||
entity_id: switch.chore_tracker_jordyn_check_&_fill_water_bowls
|
||||
entity_id: switch.chore_tracker_jordyn_fill_water_bowls
|
||||
on_turn_off:
|
||||
then:
|
||||
- script.execute: update_jordyn_ui
|
||||
- homeassistant.service:
|
||||
service: switch.turn_off
|
||||
data:
|
||||
entity_id: switch.chore_tracker_jordyn_check_&_fill_water_bowls
|
||||
entity_id: switch.chore_tracker_jordyn_fill_water_bowls
|
||||
- platform: template
|
||||
name: "Jordyn - Restock Cat Food Cans"
|
||||
id: jordyn_restock_cat_food_cans
|
||||
@@ -282,8 +282,8 @@ switch:
|
||||
|
||||
# ── Chloe's chores ──────────────────────────
|
||||
- platform: template
|
||||
name: "Chloe - Check & fill kitty feeders"
|
||||
id: chloe_check_&_fill_kitty_feeders
|
||||
name: "Chloe - Fill kitty feeders"
|
||||
id: chloe_fill_kitty_feeders
|
||||
icon: mdi:checkbox-marked-circle
|
||||
optimistic: true
|
||||
restore_mode: RESTORE_DEFAULT_OFF
|
||||
@@ -293,14 +293,14 @@ switch:
|
||||
- homeassistant.service:
|
||||
service: switch.turn_on
|
||||
data:
|
||||
entity_id: switch.chore_tracker_chloe_check_&_fill_kitty_feeders
|
||||
entity_id: switch.chore_tracker_chloe_fill_kitty_feeders
|
||||
on_turn_off:
|
||||
then:
|
||||
- script.execute: update_chloe_ui
|
||||
- homeassistant.service:
|
||||
service: switch.turn_off
|
||||
data:
|
||||
entity_id: switch.chore_tracker_chloe_check_&_fill_kitty_feeders
|
||||
entity_id: switch.chore_tracker_chloe_fill_kitty_feeders
|
||||
- platform: template
|
||||
name: "Chloe - Scoop Kitty Litter"
|
||||
id: chloe_scoop_kitty_litter
|
||||
@@ -354,7 +354,7 @@ sensor:
|
||||
int done = 0;
|
||||
if (id(jordyn_put_on_underwear).state) done++;
|
||||
if (id(jordyn_brush_teeth).state) done++;
|
||||
if (id(jordyn_check_&_fill_water_bowls).state) done++;
|
||||
if (id(jordyn_fill_water_bowls).state) done++;
|
||||
if (id(jordyn_restock_cat_food_cans).state) done++;
|
||||
return done;
|
||||
|
||||
@@ -376,7 +376,7 @@ sensor:
|
||||
update_interval: 2s
|
||||
lambda: |-
|
||||
int done = 0;
|
||||
if (id(chloe_check_&_fill_kitty_feeders).state) done++;
|
||||
if (id(chloe_fill_kitty_feeders).state) done++;
|
||||
if (id(chloe_scoop_kitty_litter).state) done++;
|
||||
if (id(chloe_replace_kitty_litter_bags).state) done++;
|
||||
return done;
|
||||
@@ -391,7 +391,7 @@ script:
|
||||
- lambda: |-
|
||||
id(jordyn_put_on_underwear).turn_off();
|
||||
id(jordyn_brush_teeth).turn_off();
|
||||
id(jordyn_check_&_fill_water_bowls).turn_off();
|
||||
id(jordyn_fill_water_bowls).turn_off();
|
||||
id(jordyn_restock_cat_food_cans).turn_off();
|
||||
- script.execute: update_jordyn_ui
|
||||
|
||||
@@ -400,7 +400,7 @@ script:
|
||||
mode: single
|
||||
then:
|
||||
- lambda: |-
|
||||
int done = (id(jordyn_put_on_underwear).state ? 1 : 0) + (id(jordyn_brush_teeth).state ? 1 : 0) + (id(jordyn_check_&_fill_water_bowls).state ? 1 : 0) + (id(jordyn_restock_cat_food_cans).state ? 1 : 0);
|
||||
int done = (id(jordyn_put_on_underwear).state ? 1 : 0) + (id(jordyn_brush_teeth).state ? 1 : 0) + (id(jordyn_fill_water_bowls).state ? 1 : 0) + (id(jordyn_restock_cat_food_cans).state ? 1 : 0);
|
||||
int total = 4;
|
||||
char buf[24];
|
||||
|
||||
@@ -451,16 +451,16 @@ script:
|
||||
lv_obj_set_style_border_width(id(card_jordyn_brush_teeth), 2, LV_PART_MAIN);
|
||||
lv_label_set_text(id(check_jordyn_brush_teeth), "");
|
||||
}
|
||||
if (id(jordyn_check_&_fill_water_bowls).state) {
|
||||
lv_obj_set_style_bg_color(id(card_jordyn_check_&_fill_water_bowls), lv_color_hex(0xF0FFF4), LV_PART_MAIN);
|
||||
lv_obj_set_style_border_color(id(card_jordyn_check_&_fill_water_bowls), lv_color_hex(0x6BCB77), LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(id(card_jordyn_check_&_fill_water_bowls), 3, LV_PART_MAIN);
|
||||
lv_label_set_text(id(check_jordyn_check_&_fill_water_bowls), "\u2705");
|
||||
if (id(jordyn_fill_water_bowls).state) {
|
||||
lv_obj_set_style_bg_color(id(card_jordyn_fill_water_bowls), lv_color_hex(0xF0FFF4), LV_PART_MAIN);
|
||||
lv_obj_set_style_border_color(id(card_jordyn_fill_water_bowls), lv_color_hex(0x6BCB77), LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(id(card_jordyn_fill_water_bowls), 3, LV_PART_MAIN);
|
||||
lv_label_set_text(id(check_jordyn_fill_water_bowls), "\u2705");
|
||||
} else {
|
||||
lv_obj_set_style_bg_color(id(card_jordyn_check_&_fill_water_bowls), lv_color_hex(0xFFFFFF), LV_PART_MAIN);
|
||||
lv_obj_set_style_border_color(id(card_jordyn_check_&_fill_water_bowls), lv_color_hex(0xEEEEEE), LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(id(card_jordyn_check_&_fill_water_bowls), 2, LV_PART_MAIN);
|
||||
lv_label_set_text(id(check_jordyn_check_&_fill_water_bowls), "");
|
||||
lv_obj_set_style_bg_color(id(card_jordyn_fill_water_bowls), lv_color_hex(0xFFFFFF), LV_PART_MAIN);
|
||||
lv_obj_set_style_border_color(id(card_jordyn_fill_water_bowls), lv_color_hex(0xEEEEEE), LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(id(card_jordyn_fill_water_bowls), 2, LV_PART_MAIN);
|
||||
lv_label_set_text(id(check_jordyn_fill_water_bowls), "");
|
||||
}
|
||||
if (id(jordyn_restock_cat_food_cans).state) {
|
||||
lv_obj_set_style_bg_color(id(card_jordyn_restock_cat_food_cans), lv_color_hex(0xF0FFF4), LV_PART_MAIN);
|
||||
@@ -545,7 +545,7 @@ script:
|
||||
mode: single
|
||||
then:
|
||||
- lambda: |-
|
||||
id(chloe_check_&_fill_kitty_feeders).turn_off();
|
||||
id(chloe_fill_kitty_feeders).turn_off();
|
||||
id(chloe_scoop_kitty_litter).turn_off();
|
||||
id(chloe_replace_kitty_litter_bags).turn_off();
|
||||
- script.execute: update_chloe_ui
|
||||
@@ -555,7 +555,7 @@ script:
|
||||
mode: single
|
||||
then:
|
||||
- lambda: |-
|
||||
int done = (id(chloe_check_&_fill_kitty_feeders).state ? 1 : 0) + (id(chloe_scoop_kitty_litter).state ? 1 : 0) + (id(chloe_replace_kitty_litter_bags).state ? 1 : 0);
|
||||
int done = (id(chloe_fill_kitty_feeders).state ? 1 : 0) + (id(chloe_scoop_kitty_litter).state ? 1 : 0) + (id(chloe_replace_kitty_litter_bags).state ? 1 : 0);
|
||||
int total = 3;
|
||||
char buf[24];
|
||||
|
||||
@@ -584,16 +584,16 @@ script:
|
||||
}
|
||||
|
||||
// Card colours
|
||||
if (id(chloe_check_&_fill_kitty_feeders).state) {
|
||||
lv_obj_set_style_bg_color(id(card_chloe_check_&_fill_kitty_feeders), lv_color_hex(0xF0FFF4), LV_PART_MAIN);
|
||||
lv_obj_set_style_border_color(id(card_chloe_check_&_fill_kitty_feeders), lv_color_hex(0x6BCB77), LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(id(card_chloe_check_&_fill_kitty_feeders), 3, LV_PART_MAIN);
|
||||
lv_label_set_text(id(check_chloe_check_&_fill_kitty_feeders), "\u2705");
|
||||
if (id(chloe_fill_kitty_feeders).state) {
|
||||
lv_obj_set_style_bg_color(id(card_chloe_fill_kitty_feeders), lv_color_hex(0xF0FFF4), LV_PART_MAIN);
|
||||
lv_obj_set_style_border_color(id(card_chloe_fill_kitty_feeders), lv_color_hex(0x6BCB77), LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(id(card_chloe_fill_kitty_feeders), 3, LV_PART_MAIN);
|
||||
lv_label_set_text(id(check_chloe_fill_kitty_feeders), "\u2705");
|
||||
} else {
|
||||
lv_obj_set_style_bg_color(id(card_chloe_check_&_fill_kitty_feeders), lv_color_hex(0xFFFFFF), LV_PART_MAIN);
|
||||
lv_obj_set_style_border_color(id(card_chloe_check_&_fill_kitty_feeders), lv_color_hex(0xEEEEEE), LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(id(card_chloe_check_&_fill_kitty_feeders), 2, LV_PART_MAIN);
|
||||
lv_label_set_text(id(check_chloe_check_&_fill_kitty_feeders), "");
|
||||
lv_obj_set_style_bg_color(id(card_chloe_fill_kitty_feeders), lv_color_hex(0xFFFFFF), LV_PART_MAIN);
|
||||
lv_obj_set_style_border_color(id(card_chloe_fill_kitty_feeders), lv_color_hex(0xEEEEEE), LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(id(card_chloe_fill_kitty_feeders), 2, LV_PART_MAIN);
|
||||
lv_label_set_text(id(check_chloe_fill_kitty_feeders), "");
|
||||
}
|
||||
if (id(chloe_scoop_kitty_litter).state) {
|
||||
lv_obj_set_style_bg_color(id(card_chloe_scoop_kitty_litter), lv_color_hex(0xF0FFF4), LV_PART_MAIN);
|
||||
@@ -935,7 +935,7 @@ lvgl:
|
||||
text_color: 0x2D3436
|
||||
|
||||
- button:
|
||||
id: card_jordyn_check_&_fill_water_bowls
|
||||
id: card_jordyn_fill_water_bowls
|
||||
x: 594
|
||||
y: 10
|
||||
width: 196
|
||||
@@ -949,10 +949,10 @@ lvgl:
|
||||
shadow_ofs_y: 3
|
||||
on_click:
|
||||
then:
|
||||
- switch.toggle: jordyn_check_&_fill_water_bowls
|
||||
- switch.toggle: jordyn_fill_water_bowls
|
||||
widgets:
|
||||
- label:
|
||||
id: check_jordyn_check_&_fill_water_bowls
|
||||
id: check_jordyn_fill_water_bowls
|
||||
align: TOP_RIGHT
|
||||
x: -10
|
||||
y: 8
|
||||
@@ -966,7 +966,7 @@ lvgl:
|
||||
- label:
|
||||
align: CENTER
|
||||
y: 17
|
||||
text: "Check & fill water bowls"
|
||||
text: "Fill water bowls"
|
||||
text_font: font_small
|
||||
text_color: 0x2D3436
|
||||
|
||||
@@ -1269,7 +1269,7 @@ lvgl:
|
||||
|
||||
# ── Chore cards ───────────────────────────────────────────────────────
|
||||
- button:
|
||||
id: card_chloe_check_&_fill_kitty_feeders
|
||||
id: card_chloe_fill_kitty_feeders
|
||||
x: 182
|
||||
y: 10
|
||||
width: 196
|
||||
@@ -1283,10 +1283,10 @@ lvgl:
|
||||
shadow_ofs_y: 3
|
||||
on_click:
|
||||
then:
|
||||
- switch.toggle: chloe_check_&_fill_kitty_feeders
|
||||
- switch.toggle: chloe_fill_kitty_feeders
|
||||
widgets:
|
||||
- label:
|
||||
id: check_chloe_check_&_fill_kitty_feeders
|
||||
id: check_chloe_fill_kitty_feeders
|
||||
align: TOP_RIGHT
|
||||
x: -10
|
||||
y: 8
|
||||
@@ -1300,7 +1300,7 @@ lvgl:
|
||||
- label:
|
||||
align: CENTER
|
||||
y: 17
|
||||
text: "Check & fill kitty feeders"
|
||||
text: "Fill kitty feeders"
|
||||
text_font: font_small
|
||||
text_color: 0x2D3436
|
||||
|
||||
|
||||
@@ -52,8 +52,8 @@ views:
|
||||
- entity: switch.chore_tracker_jordyn_brush_teeth
|
||||
name: " Brush Teeth"
|
||||
|
||||
- entity: switch.chore_tracker_jordyn_check_&_fill_water_bowls
|
||||
name: " Check & fill water bowls"
|
||||
- entity: switch.chore_tracker_jordyn_fill_water_bowls
|
||||
name: " Fill water bowls"
|
||||
|
||||
- entity: switch.chore_tracker_jordyn_restock_cat_food_cans
|
||||
name: " Restock Cat Food Cans"
|
||||
@@ -92,8 +92,8 @@ views:
|
||||
- type: entities
|
||||
title: " Chloe's Chores"
|
||||
entities:
|
||||
- entity: switch.chore_tracker_chloe_check_&_fill_kitty_feeders
|
||||
name: " Check & fill kitty feeders"
|
||||
- entity: switch.chore_tracker_chloe_fill_kitty_feeders
|
||||
name: " Fill kitty feeders"
|
||||
|
||||
- entity: switch.chore_tracker_chloe_scoop_kitty_litter
|
||||
name: " Scoop Kitty Litter"
|
||||
|
||||
@@ -48,7 +48,7 @@ kids:
|
||||
icon: "\U000F02E3" # mdi:bed
|
||||
- name: Brush Teeth
|
||||
icon: "\U000F09A9" # mdi:toothbrush
|
||||
- name: Check & fill water bowls
|
||||
- name: Fill water bowls
|
||||
icon: "\U000F01AB" # mdi:cup-water
|
||||
- name: Restock Cat Food Cans
|
||||
icon: "\U000F171C" # mdi:food-turkey
|
||||
@@ -68,7 +68,7 @@ kids:
|
||||
color: "FF6B9D"
|
||||
color_dark: "CC3A6F"
|
||||
chores:
|
||||
- name: Check & fill kitty feeders
|
||||
- name: Fill kitty feeders
|
||||
icon: "\U000F02A9" # mdi:bowl-outline
|
||||
- name: Scoop Kitty Litter
|
||||
icon: "\U000F01F7" # mdi:emoticon-poop
|
||||
|
||||
@@ -27,7 +27,7 @@ template:
|
||||
unique_id: jordyn_chores_done_today
|
||||
icon: mdi:check-circle
|
||||
state: >
|
||||
{% set chores = [states('switch.chore_tracker_jordyn_put_on_underwear'), states('switch.chore_tracker_jordyn_brush_teeth'), states('switch.chore_tracker_jordyn_check_&_fill_water_bowls'), states('switch.chore_tracker_jordyn_restock_cat_food_cans')] %}
|
||||
{% set chores = [states('switch.chore_tracker_jordyn_put_on_underwear'), states('switch.chore_tracker_jordyn_brush_teeth'), states('switch.chore_tracker_jordyn_fill_water_bowls'), states('switch.chore_tracker_jordyn_restock_cat_food_cans')] %}
|
||||
{{ chores | select('equalto', 'on') | list | count }}
|
||||
|
||||
- name: "Jordyn All Chores Done"
|
||||
@@ -53,7 +53,7 @@ template:
|
||||
unique_id: chloe_chores_done_today
|
||||
icon: mdi:check-circle
|
||||
state: >
|
||||
{% set chores = [states('switch.chore_tracker_chloe_check_&_fill_kitty_feeders'), states('switch.chore_tracker_chloe_scoop_kitty_litter'), states('switch.chore_tracker_chloe_replace_kitty_litter_bags')] %}
|
||||
{% set chores = [states('switch.chore_tracker_chloe_fill_kitty_feeders'), states('switch.chore_tracker_chloe_scoop_kitty_litter'), states('switch.chore_tracker_chloe_replace_kitty_litter_bags')] %}
|
||||
{{ chores | select('equalto', 'on') | list | count }}
|
||||
|
||||
- name: "Chloe All Chores Done"
|
||||
@@ -78,7 +78,7 @@ automation:
|
||||
entity_id: switch.chore_tracker_jordyn_brush_teeth
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.chore_tracker_jordyn_check_&_fill_water_bowls
|
||||
entity_id: switch.chore_tracker_jordyn_fill_water_bowls
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.chore_tracker_jordyn_restock_cat_food_cans
|
||||
@@ -104,7 +104,7 @@ automation:
|
||||
action:
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.chore_tracker_chloe_check_&_fill_kitty_feeders
|
||||
entity_id: switch.chore_tracker_chloe_fill_kitty_feeders
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.chore_tracker_chloe_scoop_kitty_litter
|
||||
@@ -126,7 +126,7 @@ automation:
|
||||
entity_id: switch.chore_tracker_jordyn_brush_teeth
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.chore_tracker_jordyn_check_&_fill_water_bowls
|
||||
entity_id: switch.chore_tracker_jordyn_fill_water_bowls
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.chore_tracker_jordyn_restock_cat_food_cans
|
||||
@@ -138,7 +138,7 @@ automation:
|
||||
entity_id: switch.chore_tracker_declan_scoop_dog_poop
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.chore_tracker_chloe_check_&_fill_kitty_feeders
|
||||
entity_id: switch.chore_tracker_chloe_fill_kitty_feeders
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.chore_tracker_chloe_scoop_kitty_litter
|
||||
|
||||
Reference in New Issue
Block a user