What happened with my Lovelace?

Hello!

Learnig too slowly :sweat_smile:
I have messed up the Overview screen. Had some card error, so I went to Raw config editor, and deleted the red row. But now I don´t have this “+” button down right, to add the cards…
I understand how to create the “tabs” and add something to a tab. But Only single item per tab. If I add more, the other just don´t show up.

Is there a good step by step instruction, how to build it up from beginning.
I don´t have the state cards (Did something, and now they are gone): https://developers.home-assistant.io/docs/en/frontend_add_card.html

The Tasmota devices are offline now.

title: Kodu
views:
  - panel: true
    path: ''
    theme: default
    title: Home
    icon: 'hass:home-assistant'
    badges:
      - entity: sensor.sonoff_sr04_distance
      - entity: switch.sonoff_maja_ees
    cards:
      - entity: sensor.sonoff_sr04_distance
        max: 400
        min: 0
        severity:
          green: 0
          red: 0
          yellow: 0
        theme: default
        type: gauge
        unit: mm
  - badges: []
    cards:
      - entity: sensor.sonoff_sr04_distance
        max: 400
        min: 10
        theme: default
        type: gauge
        unit: mm
      - entity: sensor.sonoff_sr04_distance
        graph: line
        type: sensor
        unit: mm
    panel: true
    theme: default
    title: Kaugus
  - title: Valgustus maja ees
    panel: true
    badges:
      - entity: switch.sonoff_maja_ees
    cards: []

This isn’t something that would be covered in manuals. This is a ‘duh’ kind of thing. The gauge card, which displays gauges requires numbers coming from a state. How can a MPH gauge in a car display the text ‘foo’ on the gauge? It can’t, cause it’s not a number.

The error is telling you that. Your result is not a number for sensor.sonoff_sr04_distance.

Now for that, there could be a number off issues. The most likely cause is that you just mistakenly put the unit of measurement inside the state (happens quite a lot with beginners). Or the created sensor (from whatever platform you are using) included the unit of measurement inside the state.

So the solution is different depending on who makes sensor.sonoff_sr04_distance sensor. What is making that sensor? Also, can you take a screenshot of that sensors state?

The NodeMCU with distance sensor was offline, when I plugged it in, this error is gone, and the distance is displayd.

I have now read a lot and watched videos about Lovelace and get more and more confused Can I manage with visual design, or have to configure it with code?

Why I can only put a single device per sheet?

Not sure what you mean by visual design. There are no ways to move objects around, if that’s what your asking. You can use the UI editor to configure things, but it’s still code or clicking.

Because you are using panel: true for all your views and you’re making a new view for every card. Remove that and add more cards in the cards section.

title: Kodu
views:
  - theme: default
    title: Home
    icon: 'hass:home-assistant'
    badges:
      - entity: sensor.sonoff_sr04_distance
      - entity: switch.sonoff_maja_ees
    cards:
      - entity: sensor.sonoff_sr04_distance
        max: 400
        min: 0
        severity:
          green: 0
          red: 0
          yellow: 0
        theme: default
        type: gauge
        unit: mm
      - entity: sensor.sonoff_sr04_distance
        max: 400
        min: 10
        theme: default
        type: gauge
        unit: mm
      - entity: sensor.sonoff_sr04_distance
        graph: line
        type: sensor
        unit: mm

If I want to start from beginning again with Lovelace, should I delete all or what should I keep?

I tried to edit the code, but as I can not understand what I do, I messed up. I copied original, so I was able to turn back the changes. I can not delete the “sheets” as it tells me to delete card first, but I can not find a way to do this in UI.

I think I have to wait until the release of HA Ver 1.0 where hopefully a click in the right box will write specific code in the configuration.yaml without knowing it.

Finally i got. I have to click the button “panel mode”. After this I was able to delete the card, and then to delete the sheet.

Created the ui-lovelace.yaml file in config folder, missed the part, where I have to insert lovelace into configutation.yaml, before editing in ui-lovelace.yaml.

Managed to set it up now with the Configure UI.


I can now start to flash all my Sonoff switches with Tasmota and integrate them to HA. Used the original software and eWeLink for years.

No Idea what now happened…

image

image

configuration.yaml
image

It happened after I pasted code for LG WebosTV into configuration.yaml. Now I deleted it, but no change…

Well, you literally told the configuration that you want to use yaml mode on Lovelace. Now you have to use the ui_lovelace.yaml file to configure your views.

This is all covered in the documentation.

If you want to use the GUI then you need to leave the Lovelace config out of configuration yaml…

Thank You. Got it fixed now.
I have read the documentation before, but somehow missed it.