Lovelace Gui custimisation

Hi All

I thought I had followed the guide “https://www.juanmtech.com/how-to-set-up-lovelace-on-home-assistant/” pretty well, Nothing happens when I have created the file ui-lovelace.yaml and restarted it as per the instruction, and inside file it is:

views:

  • type: glance
    title: Kids Room
    show_name: true
    show_state: false
    columns: 5
    entities:
    • entity: switch.sonoff171_catlight
      name: Cat light
      icon: mdi:lightbulb
      tap_action:
      action: toggle
    • entity: switch.sonoff173
      name: Lior’s Light
      icon: mdi:lightbulb
      tap_action:
      action: toggle
    • entity: switch.sonoff172
      name: Milla’s Light
      icon: mdi:lightbulb
      tap_action:
      action: toggle
    • entity: switch.kids_night_light
      name: Kids Nightlight
      icon: mdi:lightbulb
      tap_action:
      action: toggle
    • entity: switch.sonoff170_kidsfans
      name: Kids Fans
      icon: mdi:fan
      tap_action:
      action: toggle
  • type: glance
    title: Spa
    show_name: true
    show_state: false
    columns: 5
    entities:
    • entity: sensor.sonoff179_spa_heater_ds18b20_tem
      name: Spa Temp
      icon: temperature-celsius
    • entity: switch.sonoff179_spa_heater
      name: Spa Heater
      icon: mdi:fire
      tap_action:
      action: toggle
    • entity: switch.sonoff180_2
      name: Spa Filter
      icon: toggle-switch
      tap_action:
      action: toggle
    • entity: switch.sonoff180_3
      name: Spa Bubbler
      icon: toggle-switch
      tap_action:
      action: toggle
    • entity: switch.sonoff180_4
      name: Spa LED Strip
      icon: mdi:lightbulb
      tap_action:
      action: toggle
    • entity: switch.sonoff180_1
      name: Spa Spare
      icon: mdi:lightbulb
      tap_action:
      action: toggle

Any tips would be appreciated for this noob

Wes

Can you use that blue bar on top to format your code correct?
then a few things to check:

  • If you want to edit your lovelace by using the ui-lovelace.yaml you need to add this to your config:
lovelace:
  mode: yaml
  • make sure you don’t have your current browser set to use the old state: click on the image andmake sure you see this button:
    image
    If it shows something else like this, click on it:
    image

Once you’ve provided a formatted code, I can look a bit deeper but so far it looks as though you’re missing stuff at the top of your file, mainly the cards: tag.

My ui-lovelace.yaml starts like this:

title: Home
views:
  - title: Alarm
    icon: mdi:shield-check
    cards:
      - type: entity-filter
        entities:
          - entity: binary_sensor.door_window_sensor_158d000232dcd3
title: Home
views:
- type: glance
  title: Kids Room
  show_name: true
  show_state: false
  columns: 5
  entities:
    - entity: switch.sonoff171_catlight
      name: Cat light
      icon: mdi:lightbulb
      tap_action:
        action: toggle
    - entity: switch.sonoff173
      name: Lior's Light
      icon: mdi:lightbulb
      tap_action:
        action: toggle
    - entity: switch.sonoff172
      name: Milla's Light
      icon: mdi:lightbulb
      tap_action:
        action: toggle
    - entity: switch.kids_night_light
      name: Kids Nightlight
      icon: mdi:lightbulb
      tap_action:
        action: toggle
    - entity: switch.sonoff170_kidsfans
      name: Kids Fans
      icon: mdi:fan
      tap_action:
        action: toggle
- type: glance
  title: Spa
  show_name: true
  show_state: false
  columns: 5
  entities:
    - entity: sensor.sonoff179_spa_heater_ds18b20_tem
      name: Spa Temp
      icon: temperature-celsius
    - entity: switch.sonoff179_spa_heater
      name: Spa Heater
      icon: mdi:fire
      tap_action:
        action: toggle
    - entity: switch.sonoff180_2
      name: Spa Filter
      icon: toggle-switch
      tap_action:
        action: toggle
    - entity: switch.sonoff180_3
      name: Spa Bubbler
      icon: toggle-switch
      tap_action:
        action: toggle
    - entity: switch.sonoff180_4
      name: Spa LED Strip
      icon: mdi:lightbulb
      tap_action:
        action: toggle
    - entity: switch.sonoff180_1Preformatted text
      name: Spa Spare
      icon: mdi:lightbulb
      tap_action:
        action: toggle

hopefully that is what you are after :slight_smile:

Thanks. You’re still not displaying any cards because you’re not using the card tag. Look at my example. Try and start with a single card and add as you go

1 Like

Thanks lolouk44

managed to get through it and understand it :slight_smile: now to delve into scripting/automations

1 Like