From b35c7096503e373ea7e20336fb9328f77b8aa7fa Mon Sep 17 00:00:00 2001 From: Julian Tabel Date: Mon, 29 Jun 2026 15:36:39 +0200 Subject: [PATCH] Add EcoVacs dashboard as YAML-mode Convert storage-mode dashboard to dashboards/ecovacs.yaml. Preserves all button-card templates, room queue buttons, conditional controls, vacuum map, and settings panel exactly as configured in the UI. Co-Authored-By: Claude Sonnet 4.6 --- configuration.yaml | 7 ++ dashboards/ecovacs.yaml | 258 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 265 insertions(+) create mode 100644 dashboards/ecovacs.yaml diff --git a/configuration.yaml b/configuration.yaml index b65979f..95b8925 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -15,6 +15,13 @@ lovelace: icon: mdi:thermometer show_in_sidebar: true require_admin: false + lovelace-ecovacs: + mode: yaml + filename: dashboards/ecovacs.yaml + title: EcoVacs + icon: mdi:robot-vacuum + show_in_sidebar: true + require_admin: false automation: !include automations.yaml script: !include scripts.yaml diff --git a/dashboards/ecovacs.yaml b/dashboards/ecovacs.yaml new file mode 100644 index 0000000..a08a40b --- /dev/null +++ b/dashboards/ecovacs.yaml @@ -0,0 +1,258 @@ +button_card_templates: + vacuum_service: + color: "var(--text-color)" + entity: vacuum.obi_wan_cleanobi + tap_action: + action: call-service + service_data: + entity_id: vacuum.obi_wan_cleanobi + lock: + enabled: "[[[ return variables.enabled ]]]\n" + exemptions: [] + styles: + card: + - height: 80px + lock: + - color: var(--primary-text-color) + state: + - operator: template + value: "[[[ return variables.enabled ]]]\n" + styles: + card: + - color: var(--disabled-text-color) + + vacuum_room: + color: "var(--text-color)" + variables: + lock_enabled: "[[[ return ['cleaning', 'paused'].includes(states['vacuum.obi_wan_cleanobi'].state) ]]]\n" + state: + - operator: template + value: "[[[ return variables.lock_enabled && entity.state == 0 ]]]\n" + styles: + card: + - color: var(--disabled-text-color) + - styles: + card: + - background-color: var(--primary-color) + operator: ">=" + value: 1 + styles: + card: + - font-size: 12px + grid: + - position: relative + custom_fields: + order: + - display: "[[[\n if (entity.state == \"0\")\n return \"none\";\n return \"block\";\n]]]\n" + - position: absolute + - left: 5% + - top: 5% + - height: 20px + - width: 20px + - font-size: 20px + - font-weight: bold + - line-height: 20px + custom_fields: + order: "[[[ return entity.state ]]]\n" + tap_action: + action: call-service + service: script.deepbot_room_queue + service_data: + queue: input_text.deebot_obi_wan_cleanobi_queue + lock: + enabled: "[[[ return variables.lock_enabled ]]]\n" + exemptions: [] + +views: + - title: Obi-Wan Cleanobi + cards: + - type: vertical-stack + cards: + - type: custom:vacuum-card + entity: vacuum.obi_wan_cleanobi + stats: + default: + - entity_id: sensor.obi_wan_cleanobi_main_brush_lifespan + unit: "%" + subtitle: Hauptbürste + - entity_id: sensor.obi_wan_cleanobi_side_brushes_lifespan + unit: "%" + subtitle: Seitenbürsten + - entity_id: sensor.obi_wan_cleanobi_filter_lifespan + unit: "%" + subtitle: Filter + cleaning: + - entity_id: sensor.obi_wan_cleanobi_area_cleaned + unit: m² + subtitle: Geputzte Fläche + - entity_id: sensor.obi_wan_cleanobi_cleaning_duration + unit: Minuten + subtitle: Reinigungsdauer + show_status: true + show_toolbar: false + compact_view: false + + - type: custom:button-card + color: auto-no-temperature + name: Räume zum Putzen auswählen + styles: + card: + - font-size: 18px + - height: 30px + name: + - color: var(--primary-color) + + - type: horizontal-stack + cards: + - type: custom:button-card + template: vacuum_room + entity: sensor.deebot_obi_wan_cleanobi_queue_wohnzimmer1 + icon: mdi:sofa + name: Wohnzimmer + tap_action: + service_data: + room: wohnzimmer1 + - type: custom:button-card + template: vacuum_room + entity: sensor.deebot_obi_wan_cleanobi_queue_kuche1 + icon: mdi:stove + name: Küche + tap_action: + service_data: + room: kuche1 + - type: custom:button-card + template: vacuum_room + entity: sensor.deebot_obi_wan_cleanobi_queue_flur1 + icon: mdi:foot-print + name: Flur + tap_action: + service_data: + room: flur1 + + - type: horizontal-stack + cards: + - type: custom:button-card + template: vacuum_room + entity: sensor.deebot_obi_wan_cleanobi_queue_buro1 + icon: mdi:desk + name: Büro + tap_action: + service_data: + room: buro1 + - type: custom:button-card + template: vacuum_room + entity: sensor.deebot_obi_wan_cleanobi_queue_badezimmer1 + icon: mdi:shower-head + name: Bad + tap_action: + service_data: + room: badezimmer1 + + - type: vertical-stack + title: Settings + cards: + - type: entities + entities: + - entity: switch.obi_wan_cleanobi_continuous_cleaning + - entity: select.obi_wan_cleanobi_water_flow_level + - entity: switch.obi_wan_cleanobi_clean_preference + + - type: horizontal-stack + cards: + - type: conditional + conditions: + - entity: vacuum.obi_wan_cleanobi + state_not: cleaning + - entity: vacuum.obi_wan_cleanobi + state_not: paused + card: + type: custom:button-card + template: vacuum_service + icon: mdi:play + name: Start + tap_action: + action: call-service + service: script.deepbot_clean + variables: + enabled: "[[[ \n return ((!states['input_text.deebot_obi_wan_cleanobi_queue'].state || \n states['input_text.deebot_obi_wan_cleanobi_queue'].state.length === 0)\n && ['docked', 'idle', 'error', 'returning'].includes(entity.state))\n]]]\n" + + - type: conditional + conditions: + - entity: vacuum.obi_wan_cleanobi + state: cleaning + card: + type: custom:button-card + color: auto + icon: mdi:pause + name: Pause + tap_action: + action: call-service + service: vacuum.pause + service_data: + entity_id: vacuum.obi_wan_cleanobi + styles: + card: + - height: 80px + - background-color: "var(-color)" + + - type: conditional + conditions: + - entity: vacuum.obi_wan_cleanobi + state: paused + card: + type: custom:button-card + color: auto + icon: mdi:play-pause + name: Weiter + tap_action: + action: call-service + service: vacuum.start + service_data: + entity_id: vacuum.obi_wan_cleanobi + styles: + card: + - height: 80px + - background-color: "var(-color)" + + - type: custom:button-card + template: vacuum_service + icon: mdi:stop + name: Stop + tap_action: + service: vacuum.stop + variables: + enabled: "[[[ \n return !(['cleaning', 'paused', 'returning'].includes(entity.state))\n]]]\n" + + - type: horizontal-stack + cards: + - type: custom:button-card + template: vacuum_service + icon: mdi:home-map-marker + name: Zurück zur Ladestation + tap_action: + service: vacuum.return_to_base + variables: + enabled: "[[[ \n return ['docked', 'returning'].includes(entity.state)\n]]]\n" + - type: custom:button-card + color: auto + icon: mdi:map-marker + name: Lokalisieren + tap_action: + action: call-service + service: vacuum.locate + service_data: + entity_id: vacuum.obi_wan_cleanobi + styles: + card: + - height: 80px + - background-color: "var(-color)" + + - type: picture-entity + entity: image.obi_wan_cleanobi_map + show_state: false + show_name: false + camera_view: auto + tap_action: + action: none + hold_action: + action: none