diff --git a/dashboards/views/01_home.yaml b/dashboards/views/01_home.yaml index 05234f4..f198c1f 100644 --- a/dashboards/views/01_home.yaml +++ b/dashboards/views/01_home.yaml @@ -167,6 +167,40 @@ cards: target: entity_id: scene.n22_tv + # 🧹 Støvsuger + - type: horizontal-stack + cards: + - type: tile + entity: sensor.roborock_last_clean_end_compact + name: Sidst kørt + + - type: button + name: Køkken + icon: mdi:floor-plan + tap_action: + action: call-service + service: button.press + target: + entity_id: button.roborock_s8_pro_ultra_kokken_bryggers + + - type: button + name: Syd + icon: mdi:floor-plan + tap_action: + action: call-service + service: button.press + target: + entity_id: button.roborock_s8_pro_ultra_syd + + - type: button + name: Mop + icon: mdi:floor-plan + tap_action: + action: call-service + service: button.press + target: + entity_id: button.roborock_s8_pro_ultra_vac_followed_by_mop + # 💡 Lys kontrol - type: horizontal-stack cards: @@ -420,13 +454,6 @@ cards: fillColor: colorByValue(item.y) })); - # 🧹 Støvsuger (forenklet – mindre støj) - - type: entities - title: Støvsuger - entities: - - vacuum.roborock_s8_pro_ultra - - sensor.roborock_s8_pro_ultra_status - # 🎵 Sonos - type: glance title: Sonos diff --git a/include/templates/roborock.yaml b/include/templates/roborock.yaml new file mode 100644 index 0000000..1c5a208 --- /dev/null +++ b/include/templates/roborock.yaml @@ -0,0 +1,20 @@ +- sensor: + - name: "Roborock Last Clean End Compact" + unique_id: roborock_last_clean_end_compact + state: > + {% set raw = states('sensor.roborock_s8_pro_ultra_last_clean_end') %} + {% if raw in ['unknown', 'unavailable', '', none] %} + Ukendt + {% else %} + {% set dt = as_datetime(raw) %} + {% if dt is none %} + Ukendt + {% elif dt.date() == now().date() %} + i dag {{ dt.strftime('%H:%M') }} + {% elif dt.date() == (now() + timedelta(days=1)).date() %} + i morgen {{ dt.strftime('%H:%M') }} + {% else %} + {% set weekdays = ['man', 'tir', 'ons', 'tor', 'fre', 'lør', 'søn'] %} + {{ weekdays[dt.weekday()] }} {{ dt.strftime('%H:%M') }} + {% endif %} + {% endif %} \ No newline at end of file