Urgent.News

What's breaking now, across thousands of outlets.

Tech

Custom Cards in Home Assistant: Mushroom and button-card

The stock cards in Home Assistant get you a working dashboard in an afternoon. I wrote that one up in five build steps and left it there for a while. What they do not give you is control over typography, over how a number is drawn, or over a ring that shows a battery level. For that you need custom cards, and this post is about the four I ended up with, the theme that holds them together, and the…

Home Assistant's stock cards, while functional, lack control over typography, number display, and battery level indicators. Custom cards are necessary for these features, and this post covers four such cards: card-mod (CSS injection), Mushroom (compact tile cards), mini-graph-card (line charts), and button-card (JavaScript rendering).

The setup was reproducible without HACS, with custom card bundles placed under www/cards and loaded from configuration.yaml. Fonts are crucial for readability, and a theme cannot declare fonts directly. Instead, a tiny ES module enforces the typography by appending @font-face rules to the document head. This approach allows using Archivo for labels and IBM Plex Mono for values.

The Mushroom template cards are used for values, with primary and secondary text, icons, and icon colors. Card-mod enforces the typography for these cards, ensuring consistent styling across eleven template cards in the dashboard. The battery status is displayed as an SVG ring, showing charge level and switching colors at 60% and 25%. The custom field in button-card handles the computation based on the sensor state.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

SSH Usernames: Log In as the Right Remote Account

An SSH connection can reach the right server and still fail because the client is trying to log in as the wrong user. The username identifies an account on the remote machine ; it is not necessarily…

  • SSH connection requires correct remote username
  • Username syntax: username@hostname
  • Specify username with -l option if needed

How To Fix Windows Error Code 0x80070005?

Windows Error Code 0x80070005 means “ Access is Denied .” It usually appears when Windows Update fails, an app or program refuses to install, the Microsoft Store won’t download something, or a…

  • Error 0x80070005 means "Access is Denied" in Windows
  • Typically caused by insufficient admin permissions
  • Resolved by running Windows Update Troubleshooter

fix == vector: shipping a security fix to a whole fleet without arming the attacker

fix == vector: shipping a security fix to a whole fleet without arming the attacker A short, practical note on the one timing problem every open-source infrastructure team has and most never name: the…

  • Fixing security vulnerabilities in open-source software exposes previously undisclosed weaknesses.
  • Pulsed Media treats security releases as a single, ordered pipeline to minimize exposure window.

More from Tuesday 6 October →