Did you edit the dashboard at the level shown in the screenshot, delete all existing yaml, paste in the new, then find / replace kidname?
Is there a way to adjust the buttons such as the text is not cut off? On my phone I would have no idea what I am approving.
I asked my question too soon. It looks like to optimize for a smaller mobile screen youāll need to change all the columns: from 2 to 1. This adds an odd gap below the title but it grants the full text of the title and also of the approve or disapprove buttons. Same can be said on the kid chore side when they request approval as well.
Yeah, that can be an issue depending on the phone font size. The solution you found is what I would recommend, although I made an update for the next release that will allow you to set a preference that gets rid of that extra space you are seeing.
If you want to try it out or just look to compare, youāre welcome to:
kidschores-ha-dashboard/files/translations/kc_dashboard_en.yaml at main Ā· ccpk1/kidschores-ha-dashboard
Are the dates from last_completed or last_claimed in the data passed to the sensors? I donāt see them in any of the states of the approvals/claims/status/streak sensors, so I donāt think they are, but making sure. Was hoping to get at that data for some custom label based buttons I was working on - where streaks and points donāt matter, just an awareness of how long itās been since it was done.
I see last_changed, but thatās not the date Iām looking for, as that updates from the system - not based on when itās claimed or approved. I see what is the due_date in status, but not completed or claimed.
No, they arenāt passed to the sensors at this time, but one option is to look at the state of the associated button which is updated to current time when pressed. So if you look at any of the button.kc_kidname_chore_claim buttons, youāll see the last time it was pushed. Same with approval buttons and all the others.
@knotquiteawake - One other option I forgot to mention, was leaving them side by side in 2 columns, but changing the layout to of the buttons āverticalā
{{
{
'type': 'custom:mushroom-template-card',
'entity': button,
'primary': primary,
'icon': icon,
'layout': 'vertical',
'icon_color': icon_color,
'tap_action': {
'action': 'toggle'
},
'hold_action': {
'action': 'more-info'
},
}
}},
Hey @Konni - curious, how did you setup the dashboard for more than one child? I also have 3ā¦
I will give that a shot. Weāre getting close to āgoing liveā with the kids. Waiting on a tablet to show up to get their communal Kiosk. 1 is excited, 1 is full of dread and anxiety, and the other totally oblivious. its going to be great.
This is excellent! Just experimenting with it.
Any thoughts to being able to update a calendar view to show something like green checks or gold starts to see a month view for example.
Adding a google calendar or something is pretty easy, and maybe if daily chore is met then add an all day event or something?
curious if you (or anyone here) has put any thoughts into this yet
Thatās not one Iāve heard of yet. It could be possible, but you would essentially need to create a new calendar entry every time a chore gets approved. @VaReTaS is adding some features the next integration release related to calendar, but it more of the looking forward view of ongoing or upcoming events, not historical. Interesting idea though, Iām curious what the overall interest from others would be on that.
Switching between 1 column and 2 with the Chores works fine but when I switch to 3 or four columns things get weird. Any suggestions? On the Kiosk just having 2 columns is a waste of space, especially on saturdays when an extra half dozen or so chores are suddenly available for them to choose from. Having 4 columns would be swell. Iām working on a grid layout that will give the kids their overview, challenges, and Achievements in 3 columns across the top, then spanning all three columns below are their available chores and below that also spanning the 3 columns would be the rewards.
Switching between 1 column and 2 with the Chores works fine but when I switch to 3 or four columns things get weird. Any suggestions?
Iāve got a few other things Iām going to do on that chore, rewards and approvals cards that will make this easier in the future. In the meantime, I did a quick rework on just this card so the only thing youāll need to do is set the Kidname and then the ns.pref_column_count. You might also have to play with the section width in the UI. Give us a quick screenshot if it works out OK
square: false
type: grid
cards:
- type: heading
icon: mdi:broom
heading: Chores
heading_style: title
- type: custom:auto-entities
card:
square: false
type: grid
columns: 1
card_param: cards
filter:
template: >-
{%- set ns = namespace(Kid_name='',
Kid_name_normalize='',
pref_exclude_approved='',
overdue_buttons=[],
am_buttons=[],
pm_buttons=[],
other_buttons=[],
complete_buttons=[],
heading_card_blank='',
points_label='',
points_icon='',
pref_column_count='',
group_cards=[],
OVERDUE='', THIS_MORNING='', TODAY='', BONUS='',
STREAK='', STATUS='', DUE='', MULTI_APPROVE_MARK='',
SHARED_MARK='', PENDING='', CLAIMED='', APPROVED='',
NO_DUE_DATE=''
) -%}
{#-- ************* Set Translatable Text ************* --#}
{%- set ns.OVERDUE = "!!!!!!!!!!! Overdue !!!!!!!!!!!" -%}
{%- set ns.THIS_MORNING = "Due This Morning" -%}
{%- set ns.TODAY = "Due Today" -%}
{%- set ns.BONUS = "Upcoming & Bonus" -%}
{%- set ns.STREAK = "Streak" -%}
{%- set ns.STATUS = "Status" -%}
{%- set ns.DUE = "Due" -%}
{%- set ns.MULTI_APPROVE_MARK = "M" -%}
{%- set ns.SHARED_MARK = "S" -%}
{%- set ns.PENDING = "Pending" -%}
{%- set ns.CLAIMED = "Claimed" -%}
{%- set ns.APPROVED = "Approved" -%}
{%- set ns.NO_DUE_DATE = "No Due Date" -%}
{#-- ************* End Translatable Text ************* --#}
{#-- ************* Set Preferences ************* --#}
{%- set ns.pref_exclude_approved = false -%}
{%- set ns.pref_column_count = 4 -%}
{#-- ************* End Preferences ************* --#}
{# -- Set Kid_name and normalize -- #}
{%- set ns.Kid_name = 'Kidname' -%}
{%- set ns.Kid_name_normalize = ns.Kid_name | slugify() -%}
{# -- Point Labels -- #} {%- set points_sensor = 'sensor.kc_' ~
ns.Kid_name_normalize ~ '_points' -%} {%- set ns.points_label =
state_attr(points_sensor, 'unit_of_measurement') -%} {%- set
ns.points_icon = state_attr(points_sensor, 'icon') -%}
{%- set ns.heading_card_blank =
{
'type': 'heading',
'icon': ' ',
'heading': '',
'heading_style': 'title',
}
-%} {#-- Build a list of button entities for this kid --#} {%- set
prefix = 'button\\.kc_' ~ (ns.Kid_name_normalize) ~ '_chore_claim_'
-%} {%- set buttons = states.button | selectattr('entity_id', 'match',
'^' ~ prefix) | list -%}
{#-- Use namespace to persist changes across loop iterations --#} {%-
for button in buttons -%}
{%- set today_00 = as_timestamp(now().replace(hour=0, minute=0, second=0, microsecond=0)) -%}
{%- set today_12 = today_00 + (12 * 60 * 60) -%}
{%- set today_24 = today_00 + ((24 * 60 * 60) - 1) -%}
{%- set chore_sensor_id = button.entity_id | regex_replace('^button\\.kc_', 'sensor.kc_') | regex_replace('_claim_', '_status_') -%}
{%- set sensor_state = states(chore_sensor_id) -%}
{%- set due_date_str = state_attr(chore_sensor_id, 'due_date') -%}
{%- if sensor_state == 'overdue' -%}
{%- set ns.overdue_buttons = ns.overdue_buttons + [button] -%}
{%- elif sensor_state == 'approved' and state_attr(chore_sensor_id,'allow_multiple_claims_per_day') == false and ns.pref_exclude_approved == true -%}
{#-- Do nothing --#}
{%- else -%}
{%- if due_date_str is not none and due_date_str != 'unknown' -%}
{%- set due_date_ts = as_timestamp(due_date_str) -%}
{%- if today_00 <= due_date_ts < today_24 -%}
{%- if due_date_ts < today_12 -%}
{%- set ns.am_buttons = ns.am_buttons + [button] -%}
{%- elif due_date_ts < today_24 -%}
{%- set ns.pm_buttons = ns.pm_buttons + [button] -%}
{%- else -%}
{%- set ns.other_buttons = ns.other_buttons + [button] -%}
{%- endif -%}
{%- else -%}
{%- set ns.other_buttons = ns.other_buttons + [button] -%}
{%- endif -%}
{%- else -%}
{%- set ns.other_buttons = ns.other_buttons + [button] -%}
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{%- set button_groups = [
{'name': ns.OVERDUE, 'buttons': ns.overdue_buttons, 'icon': 'mdi:alert-octagon'},
{'name': ns.THIS_MORNING, 'buttons': ns.am_buttons, 'icon': 'mdi:alarm'},
{'name': ns.TODAY, 'buttons': ns.pm_buttons, 'icon': 'mdi:calendar-today'},
{'name': ns.BONUS, 'buttons': ns.other_buttons, 'icon': 'mdi:calendar-clock'}
] -%}
{%- for group in button_groups -%}
{%- if group.buttons | length > 0 -%}
{%- set heading_card =
{
'type': 'heading',
'icon': group.icon,
'heading': group.name,
'heading_style': 'title',
}
-%}
{{- heading_card -}},
{%- for button in group.buttons -%}
{%- set chore_sensor_id = button.entity_id | regex_replace('^button\\.kc_', 'sensor.kc_') | regex_replace('_claim_', '_status_') -%}
{%- set streak_chore_sensor_id = chore_sensor_id | regex_replace('_status_', '_streak_') -%}
{%- set primary = button.attributes.friendly_name.split(' - ')[2]~ (' (' ~ ns.SHARED_MARK ~ ')' if state_attr(chore_sensor_id, 'shared_chore') else '') -%}
{%- if button.state not in ['unknown', 'unavailable', 'error'] -%}
{%- set ts_diff = (now().timestamp() - as_timestamp(button.state)) | float(0) -%}
{%- set last_update = (
'%.0f minutes ago' % (ts_diff / 60)
if ts_diff < 3600 else
'%.0f hours ago' % (ts_diff / 3600)
if ts_diff < 86400 else
'%.0f days ago' % (ts_diff / 86400)
) -%}
{%- else -%}
{%- set last_update = '' -%}
{%- endif -%}
{%- set due_date_str = state_attr(chore_sensor_id, 'due_date') | string -%}
{%- set due_date = as_datetime(due_date_str).astimezone(now().tzinfo) if due_date_str not in ['None', 'unknown', 'unavailable'] else None -%}
{%- set today = now().astimezone(now().tzinfo).date() -%}
{%- set due_date_short =
ns.NO_DUE_DATE if not due_date
else (
due_date.strftime('%-I:%M %p') if due_date.date() == today else as_timestamp(due_date) | timestamp_custom('%a %b %-d', true)) -%}
{%- set multi_approve = state_attr(chore_sensor_id, 'allow_multiple_claims_per_day') -%}
{%- set chore_state = states(chore_sensor_id) -%}
{%- set state_map = {
'pending': ns.PENDING,
'claimed': ns.CLAIMED,
'approved': ns.APPROVED
} -%}
{%- set chore_state_display = (state_map[chore_state] if chore_state in state_map else chore_state) ~ ' (' ~ ns.MULTI_APPROVE_MARK ~ ')' if multi_approve == true else (state_map[chore_state] if chore_state in state_map else chore_state) -%}
{%- set points = state_attr(chore_sensor_id, 'default_points') | string -%}
{%- set global_chore_state = state_attr(chore_sensor_id, 'global_state') -%}
{%- set multi_approve = state_attr(chore_sensor_id, 'allow_multiple_claims_per_day') -%}
{%- set streak = state_attr(chore_sensor_id, 'chore_current_streak') | string -%}
{%- set secondary_options = 'Points: ' + points + '\n' + 'Streak: ' + streak + '\n' + 'Last: ' + last_update + '\n \n' + 'Status: ' + chore_state + '\n' + 'Due: ' + due_date_short -%}
{%- set secondary = ns.points_label ~ ': ' + points + '\n' + ns.STREAK + ': ' + streak + '\n \n' + ns.STATUS + ': ' + chore_state_display + '\n' + ns.DUE + ': ' + due_date_short -%}
{%- set icon_color = (
'blue' if chore_state == 'approved' and multi_approve == true else
'green' if chore_state == 'approved' else
'yellow' if chore_state == 'partial' else
'orange' if chore_state == 'claimed' else
'red' if chore_state == 'overdue' else
'purple' if '_in_part' in global_chore_state else
'grey'
) -%}
{%- set badge_color = (
'blue' if chore_state == 'approved' and multi_approve == true else
'green' if chore_state == 'approved' else
'green' if chore_state == 'partial' else
'green' if chore_state == 'claimed' else
'red' if chore_state == 'overdue' else
'purple' if '_in_part' in global_chore_state else
'grey'
) -%}
{%- set badge_icon = (
'mdi:check-bold' if chore_state == 'approved' else
'mdi:check-bold' if chore_state == 'partial' else
'mdi:check-bold' if chore_state == 'claimed' else
'mdi:exclamation-thick' if chore_state == 'overdue' else
'mdi:account-group' if '_in_part' in global_chore_state else
''
) -%}
{#-- Add chore card to the group_cards list --#}
{%- set ns.group_cards = ns.group_cards + [{
'type': 'custom:mushroom-template-card',
'entity': button.entity_id,
'primary': primary,
'multiline_secondary': 'false',
'secondary': secondary,
'layout': 'horizontal',
'icon': button.attributes.icon,
'icon_color': icon_color,
'badge_icon': badge_icon,
'badge_color': badge_color,
'tap_action': {
'action': 'toggle'
},
'hold_action': {
'action': 'more-info'
}
}] -%}
{%- endfor -%}
{#-- Display the grid card for this group --#}
{{
{
'type': 'grid',
'columns': ns.pref_column_count,
'square': false,
'cards': ns.group_cards
}
}},
{%- endif -%}
{%- endfor -%}
columns: 1
grid_options:
columns: full
Works great. Thats exactly what we were looking for. Attached is a picture of it displayed on the 9in tablet weāre using.
Then from the browser it looks super clean as well.
Thank you so much. We have high maintenance ADHD/ODD kids who need this kind of thing to keep track of what needs to be done, get rewarded for doing it, and display goals etc⦠Iām hoping this helps my wife a bit with wrangling the dishing out of chores and empowers the kids take ownership.
This isnt super helpful as I dont have exact scenario but have seen it a couple of times so thought Iād share and if anyone else has seen it may be able to provide more detail.
When an chore is tapped for approval, I get an iphone notification. If I āquickā tap on the notification, HA opens and it doesnt really do anything. (If I long press and select approve from the notification all works well).
When I go into the chores, the chore that was āquick tappedā is stil waiting for approval and the approval buttons show red and green buttons with ānoneā as the text and dont do anything. The only way I have been able to work out how to unstick one of these chores is to go to my wifeās phone and long press the notification she has on her phone and approve.
I have found
That looks really great! Thank you for that. any chance to get a german version of it? Thank you for this great work
That looks really great! Thank you for that. any chance to get a german version of it? Thank you for this great work
Yes, definitely. Check back in the next day or two for a full update!
amazing that is awesome thank you so much
awesome dashboard , been playing/testing around with it.
but is there a way to reset the historical data like total tasks completed , earned medals etc , was my testing that gave my kids a head-start
Yes, there is a built in service in the integration to handle that. You can run it from the developer tools \ actions. Service: Reset All Data Ā· ad-ha/kidschores-ha Wiki