Floorplan UI with Color synced lights

Nope, I only have that one script, not one for every light. That’s why I use parallel mode, the script can run multiple times at once.

By the way, cli is a custom icons package that can be found on HACS, it has different icons from mdi.

1 Like

Yeah I’m giving that a go now. Got a bunch of errors but working through the code.

At the start, when you’ve created your dashboard, what card do you put into that dashboard? A manual card or Picture Elements card? With my current floorplan dashboard I used the Picture Elements card

You mean the light card?
CTC with element type image


- type: custom:config-template-card
  entities:
    - light.esszimmer_tischlicht
  element:
    type: image
    image: /local/transparent.png
    entity: light.esszimmer_tischlicht
    tap_action:
      action: call-service
      service: homeassistant.toggle
      service_data:
        entity_id: light.esszimmer_tischlicht
    hold_action:
      action: fire-dom-event
      browser_mod:
        service: browser_mod.popup
        data:
          content:
            type: custom:mod-card
            card_mod:
              style:
                layout-card$:
                  grid-layout$: |
                    :host {
                      padding: 0 !important;
                    }
                    #root {
                      margin: 0px !important;
                    }
                    #root > * {
                      margin: 0px !important;
                    }
            card:
              type: 'custom:decluttering-card'
              template: light_popup_mid
              variables:
                - light: light.esszimmer_tischlicht
                - name: Esszimmer Tischlicht
                - icon: phu:ensis
          title: Esszimmer Tischlicht
  style:
    height: 27%
    left: 44.0%
    top: 78.5%
    width: 12.5%

I mean the card that you put on your dashboard that has the sidebar & floorplan view

Oh ok here we go, but its not a “card” on the dashboard its throught a yaml file:

views:
  #############################################################################################################################################
  #                                                                                                                                           #
  #                                                              Floorplan View                                                               #
  #                                                                                                                                           #
  #############################################################################################################################################

  - title: Controll Lights
    icon: "mdi:lightbulb-group-outline"
    panel: true
    path: lightcontrol
    #badges: []
    cards:
      ###################   Picture Elements Card    #####################

      - type: picture-elements
        image: /local/ui/floorplan/floorplan_night.png
        card_mod:
          style: |
            ha-card {
              background: rgba(42, 46, 48, 1)
            }
        elements:

          #########################    DAY BASE FLOORPLAN OVERLAY    #########################

          - type: "custom:config-template-card"
            entities:
              - sun.sun
            element:
              type: image
              action: none
              entity: sun.sun
              hold_action:
                action: none
              image: /local/transparent.png
              state_image:
                above_horizon: /local/ui/floorplan/floorplan_day.png
                below_horizon: /local/transparent.png
              tap_action:
                action: none
            style:
              height: 100%
              left: 50%
              mix-blend-mode: lighten
              opacity: "${ states['sensor.sunlight_opacity'].state }"
              top: 50%
              width: 100%

          #########################    Inside overlays for weather    #########################

          - type: "custom:config-template-card"
            entities:
              - sun.sun
            element:
              type: image
              action: none
              entity: sun.sun
              hold_action:
                action: none
              image: /local/transparent.png
              state_image:
                above_horizon: /local/transparent.png
                below_horizon: /local/ui/floorplan/main_night.png
              tap_action:
                action: none
            style:
              height: 100%
              left: 50%
              mix-blend-mode: lighten
              opacity: "${ states['sensor.sunlight_opacity'].state }"
              top: 50%
              width: 100%

          - type: "custom:config-template-card"
            entities:
              - sun.sun
            element:
              type: image
              action: none
              entity: sun.sun
              hold_action:
                action: none
              image: /local/transparent.png
              state_image:
                above_horizon: /local/ui/floorplan/main_day.png
                below_horizon: /local/transparent.png
              tap_action:
                action: none
            style:
              height: 100%
              left: 50%
              mix-blend-mode: lighten
              opacity: "${ states['sensor.sunlight_opacity'].state }"
              top: 50%
              width: 100%

          #########################    INDIVIDUAL LIGHTS - BLENDED IMAGE OVERLAYS    #########################

Thank you. Got it loaded in via YAML but now getting a bunch of errors. I’ve used @CDRX2 GitHub as a template to work from.

First I had a bunch of !secret errors which I’ve just commented out for now. Now I’m getting a nice big red wall telling me ‘custom element doesn’t exist decluttering-card’

I’m just running through the documentation but any rough ideas on where to look? I know I need to change all entities but surely this is moaning about the frontend HACS addon rather than the entities itself. I’ve installed it via HACS & I have checked if the .js is there and it is.

First you have to make sure, that every decluttering tamplate is on your installation and included inside your visual.yaml (or how you named it).

Its not quite easy to start with his yaml configs. Even those from Luke are not easy. But @CDRX2 has a lot of outsourcing via decluttering/templates, button/templates and whole parts of the yaml like the menu etc.

Just needed a hard reload of HA! Got the dashboard showing the sidebar now but of course, a bunch of errors. I’m running through the code to see what references what & commenting code out etc.

So far so good! Will keep you updated.


So update. I’ve got the sidebar showing, I’m making sense on where things a linked, what files contains what etc.

Issue I have is on every sidebar menu, I have these 3 columns shows a bug of errors. Not figured it out yet as error is cut off but I think I’ve got an idea on where it is. Anyone else have this or know what would it could be?

Those three big “column errors” you’re getting are on the sidebar, the now playing icon an info that shows over the multimedia menu selector when playing something on plex or other media players. Find the now playing section in the sidebar, comment it out and those should disappear.

That’s done the trick. Need to look into that as I use Plex on a daily basis!

Any idea what these weird lines around the edges?
image

Those are the borders of your button-cards. Most likely you didn’t load the CDRX theme which removes the card borders on a theme level. Don’t forget to do a frontend reload theme service (or reboot HA) once you’ve selected the theme.

Ahh I see, missed that. Looks much better now.

Now to figure out what this error is! (and also why the sensor.date_string isn’t working even though it’s there)

The errors look like the bus departure times :wink:

Inside the Time_date.yaml there is this date_string sensor. Combines the other sensors to make the full date I’m guessing. But, when I look in my HA entities, it’s not there. Any reason why?

I can create a sensor which gives the same result but want this to work.

EDIT: Was the bus departure times! Commented that out for now


Seem to have the sidebar all error free.

Do you know what could be stopping my floorplan from showing when I click lights? I’ve noticed you have 2 floors configured used lights_rez, lights_1er, lights_2e .yaml files. I have 3 floor so will work the config out but I just need to have one floor of yours show for me to work out what’s going on. Any ideas?

EDIT: Just want to add to this, nothing shows when I click on every tab in the sidebar.

Congrats on getting to this point! Just for reference, lights_rez, lights_1er and lights_2e is three floors (ground, 1st and 2nd) :wink:
As for why nothing shows, it’s hard to tell since I don’t know what you commented out or not… Have you checked the code inspector in your browser to see what’s going on?

I’ve not touched anything to do with the floorplan view on the right side of the sidebar. I’ve not commented anything in the lights_ files either

Did you create the input_select.floor helper and set its value?

I did not but I’ve just noticed that
image

I know where to create a helper but how do I configure this one?