Lovelace UI - how to install

Hi all
I’m new to Home Assistant, but I have a fully installed Home Assistant system and have already “played around” with a few things.
Before I started, I wanted to get to grips with the design of the dashboards and watched what felt like 100 YouTube videos. As far as I can tell, I haven’t found any on how to install or activate the Lovelace UI.
Can anyone link me to an installation guide or a video? And maybe a few words of clarification.
That would be great.

1 Like

There is nothing to install, you are looking at it. Lovelace-UI was the old name for dashboards.

Thank you for that. Understood.
But…
I watched e.g. videos from ResinChem Tech on Youtube.
I like e.g. the Virtual Switches:

Bildschirmfoto 2024-08-07 um 07.05.53

The code he is posting:

# ==============================================
#  LIGHT DIMMING VIRTUAL SWITCH EXAMPLE
#   Brightness attribute level may need to be
#   adjusted for your particular situation/light
# ==============================================
switch:
  - platform: template
    switches:
      lights_100:
        value_template: “{{ is_state_attr('light.basement', 'brightness', 255) }}”
        turn_on:
          service: light.turn_on
          target:
            entity_id: light.basement
          data:
            brightness: 255
        # I did not use the turn_off to prevent lights from turning off and back on when switching brightness levels
        turn_off:
          service: light.turn_off
          target:
            entity_id: light.basement

      lights_75:
        value_template: “{{ is_state_attr('light.basement', 'brightness', 191) }}”
        turn_on:
          service: light.turn_on
          target:
            entity_id: light.basement
          data:
            brightness: 191

      lights_50:
        value_template: “{{ is_state_attr('light.basement', 'brightness', 128) }}”
        turn_on:
          service: light.turn_on
          target:
            entity_id: light.basement
          data:
            brightness: 128

      lights_25:
        value_template: “{{ is_state_attr('light.basement', 'brightness', 64) }}”
        turn_on:
          service: light.turn_on
          target:
            entity_id: light.basement
          data:
            brightness: 64

Where to put this code and how to bring it to a dashboard.

Sorry. Might sound like a stupid question. But I am stuck…

That is a template switch it has nothing to do with Lovelace/dashboards except that it creates a switch you can then put in your dashboard.

It goes in your configuration.yaml file.

Thanks Tom.
Ok understood.
But how can I get this switch as a sample on my dashboard?

  1. Create the template switch
  2. Restart Home Assistant
  3. Switch should be available in auto-generated dashboard, or if you have taken control of your dashboard add the switch to an entities card.

What needs to go in the Value Temple field?

https://www.home-assistant.io/integrations/switch.template/#value_template