From cb3d6261c05858a3509d3d6016bea61e386ac474 Mon Sep 17 00:00:00 2001 From: Claus Dethlefsen Date: Fri, 10 Apr 2026 14:34:22 +0200 Subject: [PATCH] Add pro lighting view and fix Roborock battery sensor --- configuration.yaml | 2 + dashboards/views/05b_lys.yaml | 781 ++++++++++++++++++++++++++++++ include/automations/roborock.yaml | 2 +- 3 files changed, 784 insertions(+), 1 deletion(-) create mode 100644 dashboards/views/05b_lys.yaml diff --git a/configuration.yaml b/configuration.yaml index 7128647..ac7af04 100755 --- a/configuration.yaml +++ b/configuration.yaml @@ -139,6 +139,8 @@ lovelace: type: module - url: /local/community/apexcharts-card/apexcharts-card.js type: module + - url: /local/community/lovelace-mushroom/mushroom.js + type: module dashboards: lovelace: mode: yaml diff --git a/dashboards/views/05b_lys.yaml b/dashboards/views/05b_lys.yaml new file mode 100644 index 0000000..0ba98f0 --- /dev/null +++ b/dashboards/views/05b_lys.yaml @@ -0,0 +1,781 @@ +title: Lys +path: lys +icon: mdi:lightbulb-multiple +type: sections + +max_columns: 2 + +sections: + - type: grid + columns: 3 + square: false + cards: + - type: heading + heading: Globalt + - type: custom:mushroom-light-card + entity: light.alle_lys + name: Alle lys + icon: mdi:lightbulb-group + use_light_color: true + show_brightness_control: true + collapsible_controls: true + secondary_info: state + - type: custom:mushroom-light-card + entity: light.indendorslamper + name: Indendors + icon: mdi:home-lightbulb + use_light_color: true + show_brightness_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.udendorslamper + name: Udendors + icon: mdi:outdoor-lamp + use_light_color: true + show_brightness_control: true + collapsible_controls: true + - type: custom:mushroom-template-card + primary: Taend alt + secondary: Hele huset + icon: mdi:lightbulb-on + tap_action: + action: call-service + service: light.turn_on + data: + entity_id: light.alle_lys + - type: custom:mushroom-template-card + primary: Sluk alt + secondary: Hele huset + icon: mdi:lightbulb-off + tap_action: + action: call-service + service: light.turn_off + data: + entity_id: light.alle_lys + - type: custom:mushroom-template-card + primary: Taend inde + secondary: Alle indendors + icon: mdi:home-lightbulb + tap_action: + action: call-service + service: light.turn_on + data: + entity_id: light.indendorslamper + - type: custom:mushroom-template-card + primary: Sluk inde + secondary: Alle indendors + icon: mdi:home-lightbulb-outline + tap_action: + action: call-service + service: light.turn_off + data: + entity_id: light.indendorslamper + - type: custom:mushroom-template-card + primary: Taend ude + secondary: Alle udendors + icon: mdi:string-lights + tap_action: + action: call-service + service: light.turn_on + data: + entity_id: light.udendorslamper + - type: custom:mushroom-template-card + primary: Sluk ude + secondary: Alle udendors + icon: mdi:string-lights-off + tap_action: + action: call-service + service: light.turn_off + data: + entity_id: light.udendorslamper + + - type: grid + cards: + - type: heading + heading: Stue + - type: custom:mushroom-light-card + entity: light.livingroom + name: Stue samlet + icon: mdi:sofa + use_light_color: true + show_brightness_control: true + collapsible_controls: true + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-template-card + primary: Bright + secondary: Scene + icon: mdi:brightness-7 + tap_action: + action: call-service + service: scene.turn_on + data: + entity_id: scene.stue_bright + - type: custom:mushroom-template-card + primary: Annes favorit + secondary: Scene + icon: mdi:heart-outline + tap_action: + action: call-service + service: scene.turn_on + data: + entity_id: scene.stue_annes_favorit + - type: custom:mushroom-template-card + primary: Relax + secondary: Scene + icon: mdi:sofa-outline + tap_action: + action: call-service + service: scene.turn_on + data: + entity_id: scene.stue_relax_minus_syd + - type: custom:mushroom-template-card + primary: Manedens farver + secondary: Script + icon: mdi:palette + tap_action: + action: call-service + service: script.turn_on + data: + entity_id: script.monthly_color_scene + - type: custom:mushroom-template-card + primary: Raketloop + secondary: Script + icon: mdi:rocket-launch + tap_action: + action: call-service + service: script.turn_on + data: + entity_id: script.raketloop + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-light-card + entity: light.raket + name: Raket + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.spisebord + name: Spisebord + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.syd + name: Syd + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.panton + name: Panton + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.pendle1 + name: Pendle 1 + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.pendle2 + name: Pendle 2 + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + + - type: grid + cards: + - type: heading + heading: Andreas + - type: custom:mushroom-light-card + entity: light.andreas_vaerelse + name: Andreas samlet + icon: mdi:bed + use_light_color: true + show_brightness_control: true + collapsible_controls: true + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-template-card + primary: Standard + secondary: Script + icon: mdi:white-balance-sunny + tap_action: + action: call-service + service: script.turn_on + data: + entity_id: script.andreas_standard_colors + - type: custom:mushroom-template-card + primary: Manedens farver + secondary: Script + icon: mdi:palette + tap_action: + action: call-service + service: script.turn_on + data: + entity_id: script.andreas_color_scene + - type: custom:mushroom-template-card + primary: Andreasloop + secondary: Toggle + icon: mdi:sync + entity: switch.andreas_colorloop_toggle + tap_action: + action: toggle + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-light-card + entity: light.andreas_lysstrip + name: Lysstrip + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.andreas_stol + name: Stol + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + + - type: grid + cards: + - type: heading + heading: Daniel + - type: custom:mushroom-light-card + entity: light.daniels_vaerelse + name: Daniel samlet + icon: mdi:bed + use_light_color: true + show_brightness_control: true + collapsible_controls: true + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-template-card + primary: Standard + secondary: Script + icon: mdi:white-balance-sunny + tap_action: + action: call-service + service: script.turn_on + data: + entity_id: script.daniel_standard_colors + - type: custom:mushroom-template-card + primary: Manedens farver + secondary: Script + icon: mdi:palette + tap_action: + action: call-service + service: script.turn_on + data: + entity_id: script.daniel_color_scene + - type: custom:mushroom-template-card + primary: Danielloop + secondary: Toggle + icon: mdi:sync + entity: switch.daniel_colorloop_toggle + tap_action: + action: toggle + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-light-card + entity: light.daniel_lysstrip + name: Lysstrip + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.bamse + name: Bamse + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + + - type: grid + cards: + - type: heading + heading: Sovevaerelse + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-template-card + primary: Taend alle + secondary: Sovevaerelse + icon: mdi:lightbulb-on + tap_action: + action: call-service + service: light.turn_on + data: + entity_id: + - light.claus + - light.anne + - light.sov_dor + - light.sov_midt + - light.sov_vindue + - type: custom:mushroom-template-card + primary: Sluk alle + secondary: Sovevaerelse + icon: mdi:lightbulb-off + tap_action: + action: call-service + service: light.turn_off + data: + entity_id: + - light.claus + - light.anne + - light.sov_dor + - light.sov_midt + - light.sov_vindue + - type: custom:mushroom-template-card + primary: Standard + secondary: Script + icon: mdi:weather-night + tap_action: + action: call-service + service: script.turn_on + data: + entity_id: script.bed_standard_colors + - type: custom:mushroom-template-card + primary: Manedens farver + secondary: Script + icon: mdi:palette + tap_action: + action: call-service + service: script.turn_on + data: + entity_id: script.bed_color_scene + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-light-card + entity: light.claus + name: Claus + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.anne + name: Anne + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.sov_dor + name: Dor + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.sov_midt + name: Midt + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.sov_vindue + name: Vindue + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + + - type: grid + cards: + - type: heading + heading: Badevaerelse + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-template-card + primary: Taend alle + secondary: Badevaerelse + icon: mdi:lightbulb-on + tap_action: + action: call-service + service: light.turn_on + data: + entity_id: + - light.bad_nw + - light.bad_ne + - light.bad_sw + - light.bad_se + - light.spejl1 + - light.spejl2 + - light.badevaerelse_2 + - type: custom:mushroom-template-card + primary: Sluk alle + secondary: Badevaerelse + icon: mdi:lightbulb-off + tap_action: + action: call-service + service: light.turn_off + data: + entity_id: + - light.bad_nw + - light.bad_ne + - light.bad_sw + - light.bad_se + - light.spejl1 + - light.spejl2 + - light.badevaerelse_2 + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-light-card + entity: light.bad_nw + name: Bad NV + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.bad_ne + name: Bad NO + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.bad_sw + name: Bad SV + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.bad_se + name: Bad SO + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.spejl1 + name: Spejl 1 + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.spejl2 + name: Spejl 2 + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.badevaerelse_2 + name: Ekstra bad + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + + - type: grid + cards: + - type: heading + heading: Gang og forgang + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-template-card + primary: Taend gang + secondary: Fordelingsgang + icon: mdi:lightbulb-on + tap_action: + action: call-service + service: light.turn_on + data: + entity_id: + - light.fordelingsgang_1 + - light.fordelingsgang_2 + - light.fordelingsgang_3 + - light.fordelingsgang_4 + - light.fordelingsgang_5 + - type: custom:mushroom-template-card + primary: Sluk gang + secondary: Fordelingsgang + icon: mdi:lightbulb-off + tap_action: + action: call-service + service: light.turn_off + data: + entity_id: + - light.fordelingsgang_1 + - light.fordelingsgang_2 + - light.fordelingsgang_3 + - light.fordelingsgang_4 + - light.fordelingsgang_5 + - type: custom:mushroom-light-card + entity: light.forgang + name: Forgang + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-light-card + entity: light.fordelingsgang_1 + name: Gang 1 + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.fordelingsgang_2 + name: Gang 2 + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.fordelingsgang_3 + name: Gang 3 + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.fordelingsgang_4 + name: Gang 4 + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.fordelingsgang_5 + name: Gang 5 + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + + - type: grid + cards: + - type: heading + heading: Ude og have + - type: custom:mushroom-light-card + entity: light.udendorslamper + name: Alle udelys + icon: mdi:pine-tree + use_light_color: true + show_brightness_control: true + collapsible_controls: true + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-template-card + primary: Have standard + secondary: Script + icon: mdi:flower-outline + tap_action: + action: call-service + service: script.turn_on + data: + entity_id: script.have_standard_colors + - type: custom:mushroom-template-card + primary: Have farver + secondary: Script + icon: mdi:palette + tap_action: + action: call-service + service: script.turn_on + data: + entity_id: script.have_color_scene + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-light-card + entity: light.garage + name: Garage + use_light_color: true + show_brightness_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.fordoer + name: Fordor + use_light_color: true + show_brightness_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.udendors_forgang + name: Forgang ude + use_light_color: true + show_brightness_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.indkorsel_plug + name: Indkorsel + use_light_color: true + show_brightness_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.hue_outdoor_spot_1 + name: Have spot 1 + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.hue_outdoor_spot_2 + name: Have spot 2 + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.hue_outdoor_spot_3 + name: Have spot 3 + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + + - type: grid + cards: + - type: heading + heading: Julelys + - type: custom:mushroom-light-card + entity: light.julelys + name: Alt julelys + icon: mdi:string-lights + use_light_color: true + show_brightness_control: true + collapsible_controls: true + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-light-card + entity: light.ronnebaer + name: Ronnebaer + use_light_color: true + show_brightness_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.koste + name: Koste + use_light_color: true + show_brightness_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.terasse + name: Terrasse + use_light_color: true + show_brightness_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.paradis + name: Paradis + use_light_color: true + show_brightness_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.udetrae + name: Udetrae + use_light_color: true + show_brightness_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.on_off_plug_2 + name: Juleplug + use_light_color: true + show_brightness_control: true + collapsible_controls: true + + - type: grid + cards: + - type: heading + heading: Ovrige + - type: grid + columns: 2 + square: false + cards: + - type: custom:mushroom-light-card + entity: light.sauna + name: Sauna + use_light_color: true + show_brightness_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.strip + name: Strip + use_light_color: true + show_brightness_control: true + show_color_control: true + show_color_temp_control: true + collapsible_controls: true + - type: custom:mushroom-light-card + entity: light.sonoff_10006a2cdd + name: Sonoff ekstra + use_light_color: true + show_brightness_control: true + collapsible_controls: true diff --git a/include/automations/roborock.yaml b/include/automations/roborock.yaml index 9997678..7fc50be 100644 --- a/include/automations/roborock.yaml +++ b/include/automations/roborock.yaml @@ -55,7 +55,7 @@ roborock_family_away: "{{ is_state('binary_sensor.family_presence', 'off') }}" roborock_auto_runs: "{{ states('input_number.roborock_auto_runs_today') | int(0) }}" roborock_is_cleaning: "{{ is_state('vacuum.roborock_s8_pro_ultra', 'cleaning') }}" - roborock_battery: "{{ state_attr('vacuum.roborock_s8_pro_ultra', 'battery_level') | int(0) }}" + roborock_battery: "{{ states('sensor.roborock_s8_pro_ultra_batteri') | int(0) }}" action: - choose: