diff --git a/mobile_dashboard.yaml b/mobile_dashboard.yaml index 5bf5a98..94aa219 100644 --- a/mobile_dashboard.yaml +++ b/mobile_dashboard.yaml @@ -4177,11 +4177,20 @@ views: double_tap_action: action: none - type: custom:mushroom-template-badge - content: |- + content: >- {% from 'time.jinja' import input_datetime_read %} - {{ input_datetime_read('input_datetime.tony_morning_meds_taken') }} + + {% if is_state('input_boolean.tony_morning_meds_reminder','on') %} + + Waiting: {{ states('counter.tony_morning_meds_reminder_count') | int + }} reminders + + {% else %} + + {{ input_datetime_read('input_datetime.tony_morning_meds_taken') }} + + {% endif %} icon: mdi:medication - color: '' entity: input_datetime.tony_morning_meds_taken label: Tony Morning Meds tap_action: @@ -4195,19 +4204,43 @@ views: users: - f387a983651a4321a7411ff8cf36f949 - c3909d27048140729f002aaef0391775 - - condition: state - entity: input_boolean.tony_morning_meds_taken - state: 'on' + - condition: or + conditions: + - condition: state + entity: input_boolean.tony_morning_meds_taken + state: 'on' + - condition: state + entity: input_boolean.tony_morning_meds_reminder + state: 'on' - condition: state entity: input_boolean.tony_awake state: 'on' + color: |- + {% set counter = states('counter.tony_morning_meds_reminder_count') %} + {% if is_state('input_boolean.tony_morning_meds_taken','on') %} + var(--success-color) + {% elif counter >= 3 %} + var(--error-color) + {% elif counter >= 1 %} + var(--warning-color) + {% else %} + '' + {% endif %} - type: custom:mushroom-template-badge - content: |- - {% from 'time.jinja' import input_datetime_read %} - {{ input_datetime_read('input_datetime.tony_afternoon_meds_taken') }} + content: >- + {% from 'time.jinja' import input_datetime_read %} {% if + is_state('input_boolean.tony_afternoon_meds_reminder','on') %} + Waiting: {{ states('counter.tony_afternoon_meds_reminder_count') | int + }} reminders {% else %} {{ + input_datetime_read('input_datetime.tony_afternoon_meds_taken') }} {% + endif %} icon: mdi:medication - color: '' - entity: input_datetime.tony_morning_meds_taken + color: >- + {% set counter = states('counter.tony_afternoon_meds_reminder_count') + %} {% if is_state('input_boolean.tony_afternoon_meds_taken','on') %} + var(--success-color) {% elif counter >= 3 %} var(--error-color) {% + elif counter >= 1 %} var(--warning-color) {% else %} '' {% endif %} + entity: input_datetime.tony_afternoon_meds_taken label: Tony Afternoon Meds tap_action: action: none @@ -4220,19 +4253,37 @@ views: users: - f387a983651a4321a7411ff8cf36f949 - c3909d27048140729f002aaef0391775 - - condition: state - entity: input_boolean.tony_afternoon_meds_taken - state: 'on' + - condition: or + conditions: + - condition: state + entity: input_boolean.tony_afternoon_meds_taken + state: 'on' + - condition: state + entity: input_boolean.tony_afternoon_meds_reminder + state: 'on' - condition: state entity: input_boolean.tony_awake state: 'on' - type: custom:mushroom-template-badge - content: |- - {% from 'time.jinja' import input_datetime_read %} - {{ input_datetime_read('input_datetime.tony_night_meds_taken') }} + content: >- + {% from 'time.jinja' import input_datetime_read %} {% if + is_state('input_boolean.tony_night_meds_reminder','on') %} Waiting: {{ + states('counter.tony_night_meds_reminder_count') | int }} reminders {% + else %} {{ input_datetime_read('input_datetime.tony_night_meds_taken') + }} {% endif %} icon: mdi:medication - color: '' - entity: input_datetime.tony_morning_meds_taken + color: |- + {% set counter = states('counter.tony_night_meds_reminder_count') %} + {% if is_state('input_boolean.tony_night_meds_taken','on') %} + var(--success-color) + {% elif counter >= 3 %} + var(--error-color) + {% elif counter >= 1 %} + var(--warning-color) + {% else %} + '' + {% endif %} + entity: input_datetime.tony_night_meds_taken label: Tony Night Meds tap_action: action: none @@ -4245,15 +4296,34 @@ views: users: - f387a983651a4321a7411ff8cf36f949 - c3909d27048140729f002aaef0391775 - - condition: state - entity: input_boolean.tony_night_meds_taken - state: 'on' + - condition: or + conditions: + - condition: state + entity: input_boolean.tony_night_meds_taken + state: 'on' + - condition: state + entity: input_boolean.tony_night_meds_reminder + state: 'on' - type: custom:mushroom-template-badge - content: |- - {% from 'time.jinja' import input_datetime_read %} - {{ input_datetime_read('input_datetime.tina_morning_meds_taken') }} + content: >- + {% from 'time.jinja' import input_datetime_read %} {% if + is_state('input_boolean.tina_night_meds_reminder','on') %} Waiting: {{ + states('counter.tina_morning_meds_reminder_count') | int }} reminders + {% else %} {{ + input_datetime_read('input_datetime.tina_morning_meds_taken') }} {% + endif %} icon: mdi:medication - color: '' + color: |- + {% set counter = states('counter.tina_morning_meds_reminder_count') %} + {% if is_state('input_boolean.tina_morning_meds_taken','on') %} + var(--success-color) + {% elif counter >= 3 %} + var(--error-color) + {% elif counter >= 1 %} + var(--warning-color) + {% else %} + '' + {% endif %} entity: input_datetime.tina_morning_meds_taken label: Tina Morning Meds tap_action: @@ -4267,15 +4337,33 @@ views: users: - f387a983651a4321a7411ff8cf36f949 - c3909d27048140729f002aaef0391775 - - condition: state - entity: input_boolean.tina_morning_meds_taken - state: 'on' + - condition: or + conditions: + - condition: state + entity: input_boolean.tina_morning_meds_taken + state: 'on' + - condition: state + entity: input_boolean.tina_morning_meds_reminder + state: 'on' - type: custom:mushroom-template-badge - content: |- - {% from 'time.jinja' import input_datetime_read %} - {{ input_datetime_read('input_datetime.tina_night_meds_taken') }} + content: >- + {% from 'time.jinja' import input_datetime_read %} {% if + is_state('input_boolean.tina_night_meds_reminder','on') %} Waiting: {{ + states('counter.tina_night_meds_reminder_count') | int }} reminders {% + else %} {{ input_datetime_read('input_datetime.tina_night_meds_taken') + }} {% endif %} icon: mdi:medication - color: '' + color: |- + {% set counter = states('counter.tina_night_meds_reminder_count') %} + {% if is_state('input_boolean.tina_night_meds_taken','on') %} + var(--success-color) + {% elif counter >= 3 %} + var(--error-color) + {% elif counter >= 1 %} + var(--warning-color) + {% else %} + '' + {% endif %} entity: input_datetime.tina_night_meds_taken label: Tina Night Meds tap_action: @@ -4289,15 +4377,44 @@ views: users: - f387a983651a4321a7411ff8cf36f949 - c3909d27048140729f002aaef0391775 - - condition: state - entity: input_boolean.tina_night_meds_taken - state: 'on' + - condition: or + conditions: + - condition: state + entity: input_boolean.tina_night_meds_taken + state: 'on' + - condition: state + entity: input_boolean.tina_night_meds_reminder + state: 'on' - type: custom:mushroom-template-badge - content: |- - {% from 'time.jinja' import input_datetime_read %} - {{ input_datetime_read('input_datetime.kallen_morning_meds_taken') }} + content: >- + {% from 'time.jinja' import input_datetime_read %} {% if + is_state('input_boolean.kallen_morning_meds_reminder','on') %} + Waiting: {{ states('counter.kallen_morning_meds_reminder_count') | int + }} reminders {% else %} {{ + input_datetime_read('input_datetime.kallen_morning_meds_taken') }} {% + endif %} icon: mdi:medication - color: '' + color: >- + {% set counter = states('counter.kallen_morning_meds_reminder_count') + %} + + {% if is_state('input_boolean.kallen_morning_meds_taken','on') %} + + var(--success-color) + + {% elif counter >= 3 %} + + var(--error-color) + + {% elif counter >= 1 %} + + var(--warning-color) + + {% else %} + + '' + + {% endif %} entity: input_datetime.kallen_morning_meds_taken label: Kallen Morning Meds tap_action: @@ -4312,18 +4429,37 @@ views: - f387a983651a4321a7411ff8cf36f949 - c3909d27048140729f002aaef0391775 - 879b4c04e32841b3ad1d2763a11b4e70 - - condition: state - entity: input_boolean.kallen_morning_meds_taken - state: 'on' + - condition: or + conditions: + - condition: state + entity: input_boolean.kallen_morning_meds_taken + state: 'on' + - condition: state + entity: input_boolean.kallen_morning_meds_reminder + state: 'on' - condition: state entity: input_boolean.kallen_sleeping state: 'off' - type: custom:mushroom-template-badge - content: |- - {% from 'time.jinja' import input_datetime_read %} - {{ input_datetime_read('input_datetime.kallen_night_meds_taken') }} + content: >- + {% from 'time.jinja' import input_datetime_read %} {% if + is_state('input_boolean.kallen_night_meds_reminder','on') %} Waiting: + {{ states('counter.kallen_night_meds_reminder_count') | int }} + reminders {% else %} {{ + input_datetime_read('input_datetime.kallen_night_meds_taken') }} {% + endif %} icon: mdi:medication - color: '' + color: |- + {% set counter = states('counter.kallen_night_meds_reminder_count') %} + {% if is_state('input_boolean.kallen_night_meds_taken','on') %} + var(--success-color) + {% elif counter >= 3 %} + var(--error-color) + {% elif counter >= 1 %} + var(--warning-color) + {% else %} + '' + {% endif %} entity: input_datetime.kallen_night_meds_taken label: Kallen Night Meds tap_action: @@ -4338,9 +4474,14 @@ views: - f387a983651a4321a7411ff8cf36f949 - c3909d27048140729f002aaef0391775 - 879b4c04e32841b3ad1d2763a11b4e70 - - condition: state - entity: input_boolean.kallen_night_meds_taken - state: 'on' + - condition: or + conditions: + - condition: state + entity: input_boolean.kallen_night_meds_taken + state: 'on' + - condition: state + entity: input_boolean.kallen_night_meds_reminder + state: 'on' - condition: state entity: input_boolean.kallen_sleeping state: 'on'