A different take on designing a Lovelace UI

I am very interested in this as well.

Were you ever able to fix the font/margins on this? Right now it looks weird.

I also have a general question, my sidebar is showing some errors. Like the date is not showing and something else is also throwing NULL. And phone stuff not working either?

@masoncrawford1994 Thanks for the help. Actually I am looking for a roller shutter card and icon/animation.
But @Quinnod34 does have some pretty icons.
Also thanks to @Mattias_Persson for the reply. The post references a cover and base_cover template, which I do not have available. Do you have more details on this?
Ideally I would like the card similar to the one in the screenshot.
05177642bfd8dfcd621cf567353c9e281a303585_2_642x500
It should contain state the name.
Below the status (opened/closed or percentage).
Double tab should open a list of mushroom cards, similar to the light card.
And if possible I would like to add swipe up on the card to trigger cover.open_cover, swipe down cover.close_cover and tap_action to action cover.stop_cover.

Currently I have the following
  template:
    - base
  tap_action:
    action: call-service
    service: cover.stop_cover
    service_data:
      entity_id: >
        [[[
          return variables.entity_id;
        ]]]
  double_tap_action:
    action: fire-dom-event
    browser_mod:
      service: browser_mod.popup
      data:
        title: >
          [[[
            return !entity || entity.attributes.friendly_name;
          ]]]
        card_mod:
          style:
            #popup header
            .:
        content:
          type: entities
          card_mod:
            style: |
              #states {
                padding-top: 0.5em;
              }
          entities: >
            [[[
              if (entity) {
                  let covers = [],
                      id = Boolean(entity.attributes.entity_id)
                          ? [entity.entity_id].concat(entity.attributes.entity_id)
                          : [entity.entity_id];

                  for (let i = 0; i < id.length; i++) {
                      covers.push({
                          "type": "custom:mushroom-cover-card",
                          "entity": id[i],
                          "fill_container": false,
                          "primary_info": "name",
                          "secondary_info": "state",
                          "icon_type": "icon",
                          "show_buttons_control": true,
                          "show_position_control": true
                      });
                  }
                  return covers;
              }
            ]]]```

I am missing:

  • Animated icon
  • Popup should list only the group entities, not the group itself
  • Swipe Actions
  • % if not fully opened or closed

many thanks for your reply. im very sorry, i just didn opened my eyes… i forgot to install the mini-graph-bundle … sorry for spamming in here

yep i was able to… i forgot to install the mini-graph-bar-bundle, which is needed due to the energy.yaml…
install it first!

to become rid of the first “null” you need to install time&date the second “null” should be an integration for weather… dive into sidebar.yaml

I did. It works. But the text alignment of the bigger number is incorrect.
Also on mobile it is weird.
The text doesn’t resize on mobile, stays big.

Thanks for pointing out the time&date.
I’m going through all files. Editing where needed. But some integrations are not mentioned on GitHub. That’s why i miss some.

People seem too scared to break the code that they would rather learn Swedish because it would be far easier than messing around with the code.

I can’t figure out why I can’t grab the UDM-SE information.
Am I missing something? I updated the secrets.yaml, grabbed the packages file.
Created a local user on the UDM webui. Though, what kind of user does it have to be, Admin/Viewer?

I am getting this error:

Logger: homeassistant.components.command_line
Source: components/command_line/__init__.py:48
Integration: command_line (documentation, issues)
First occurred: 1:51:41 PM (1 occurrences)
Last logged: 1:51:41 PM

Command failed (with return code 1): 
python3 << EOF import json, yaml, requests from datetime import datetime from urllib3 import disable_warnings disable_warnings() SECRETS_FILE = "/config/secrets.yaml" def get_secret(secret): try: with open(SECRETS_FILE, "r", encoding="utf8") as file: secrets = yaml.full_load(file) for key, value in secrets.items(): if key == secret: return value except FileNotFoundError: print("secrets.yaml not found") exit() IP = get_secret("unifi_ip") PORT = get_secret("unifi_port") USER = get_secret("unifi_user") PASS = get_secret("unifi_pass") URL = f"https://{IP}:{PORT}" login = requests.request("POST", f"{URL}/api/auth/login", \ headers={"Content-Type": "application/json"}, \ data=json.dumps({"username": USER, "password": PASS}), verify=False) response = requests.request("GET", f"{URL}/proxy/network/api/s/default/stat/device/", \ cookies=login.cookies, verify=False) data = response.json()["data"][0] print(json.dumps({ "cpu": data["system-stats"]["cpu"], "cpu_temp": round(data["temperatures"][1]["value"], 1), "mem": data["system-stats"]["mem"], "disk": round(data["storage"][1]["used"] / data["storage"][1]["size"] * 100, 1), "internet": data["internet"], "uptime": datetime.fromtimestamp(data["startup_timestamp"]).isoformat(), "version": data["displayable_version"] })) EOF

Kind of looks like the command line isn’t working.

Any chance you can upload your code?

1 Like

Hello, does anyone have any tips for me? The updates from HACS are not displayed to me during the updates.

grafik

The code is completely taken over by Matthias

You must have something wrong because you can’t even see the HA version in the update panel. See if you have all sensors available?

HI djoaza,

grafik

YOU were right, the Sonsor wasn’t active, that’s how it looks now. However, the updates from Hacs are still not displayed to me. Do I have to install something for this…?? Or is nothing more detailed displayed in the HACS updates?

Until recently, HACS had sensor.hacs which included the number of updates. This has been replaced hass-config/version_updates.yaml at dbfed2fedc8992d79f9dca142dd01ebfc1766f18 · matt8707/hass-config · GitHub

For some reason my background is black. I have enabled the tablet theme ofcourse, but the background won’t change to the homekit background.

Anybody an idea?

  • Cleared cache
  • Also happening in other browser (Edge)
  • Using Chrome

just updated to HA 10.0 and all my template sensor inside include-template became unavailable. any had this issue?

1 Like

I had the same error, I recommend using the search function (ctrl/command f) before asking for help.

This is the final post on the issue, but confirm that your account has read/wright to UniFiOS not just networking in the UDM webui

I have had this issue, it just fixed itself after a few days, I did turn the theme off and on again and that did it but only after trying that 10 times over 3 days. sorry I can’t be more help

I think you might need to enable experimental features in the HACS integrations configuration


Screen Shot 2022-10-27 at 11.37.06 pm

1 Like

thats it. Thank you

Of course i searched this topic before i posted the question.
I don’t checked everything.
All is correct.
It just isn’t working.

I pinged the device, that works.
curl doesn’t work, i get authentication failed. With my admin account and the user i created.

But like I said, it seems the way the code is implemented doesn’t work.
I put the python code into a separate .py file, and change the command line in the router yaml to launch the python file.

Now my logs state that the json is empty, which is probably the result of authentication failure?

@xADDRx Happy to help

@bokkoman, I understand the frustration, I had the exact same issue recently and the error message is useless. can you confirm your role in UniFiOs is configured like mine.
Note: The permission for UniFi OS was the issue for me it needs to be Full management as well as the permission for Network