Skip to content

Morph on Home Assistant Dashboards

Morph also works on any Home Assistant dashboard. The dashboard stays Home Assistant’s own: every built-in card, every HACS card, the visual editor and your themes work as before.

Morph adds What you get
Morph cards 21 cards in Add card as Morph · …, each with HA’s visual editor and sizing.
brAIn’s cases and Ask brAIn’s cases in the room they are about, and the Ask line, as cards.
Dashboards brAIn changes Tap a card, tell brAIn what to change, watch it change live. History and undo.
Card types A card brAIn builds once. Change the type and every copy changes.
The room rail and themes Morph’s rail on any sections tab, and its looks as HA themes.

There is nothing to add to your resources. The brAIn integration loads it on every Home Assistant page. If Morph’s layer fails to load, the dashboard is still a working Home Assistant dashboard.

Morph cards

In Add card, look under Custom cards for Morph · …. Each card has Home Assistant’s visual editor. Tap does the main thing, slide sets a level, and hold opens the card in place with its options, its history and Details.

Ten Morph cards in a two-column grid: a Bar light at 40%, a Kitchen Cans light group, a Living Room Fan at Medium, a Garage Door with Open door, an unlocked Front Door with Lock, a Porch lights switch, an Evening button, a docked vacuum with Start, a Downstairs thermostat cooling to 72° with mode chips, and an Attic Temperature reading

Card Type For
Morph · Light custom:morph-light-card A light as a strip: tap toggles, slide sets brightness, hold for colour and history.
Morph · Light group custom:morph-light-group-card A room of lights in one strip, each light a lane.
Morph · Fan custom:morph-fan-card Tap toggles, slide sets the speed.
Morph · Cover custom:morph-cover-card Blinds, shades and garage doors. A garage door asks before it opens.
Morph · Lock custom:morph-lock-card Lock or unlock, with a second tap to confirm.
Morph · Switch custom:morph-switch-card A switch, helper, siren or automation.
Morph · Button custom:morph-button-card A button, script or scene, with when it last ran.
Morph · Vacuum custom:morph-vacuum-card Start, dock and state.
Morph · Thermostat custom:morph-climate-card The temperature on a ruler with the target band, and up to four script or scene buttons.
Morph · Sensor custom:morph-sensor-card A reading with today’s sparkline.
Morph · Readings custom:morph-readings-card Several temperature or humidity sensors on one chart.
Morph · Meter custom:morph-meter-card Energy, water or gas: today, and the last seven days as bars.
Morph · Media custom:morph-media-card What is playing, play and pause, volume and source.
Morph · Camera custom:morph-camera-card A snapshot every ten seconds. Opened, it streams.
Morph · Openings custom:morph-list-card Doors, windows, motion and leaks as a list that says what needs you.
Morph · Person custom:morph-person-card Who is home, and since when.
Morph · Weather custom:morph-weather-card Now and the forecast.
Morph · Alarm custom:morph-alarm-card The alarm’s modes as buttons. Disarming asks twice.
Morph · Scenes custom:morph-scenes-card A row of scenes, with the one last set lit.
Morph · Entity custom:morph-entity-card Any entity as a strip with its state.
Morph · Note custom:morph-note-card A line of words on the dashboard.

Set a card up

Everything is in the visual editor, so nothing has to be typed as YAML.

Field What it sets
Entity (or entities), name, icon What the card shows.
Room, Colour Its room and colour.
Interactions Home Assistant’s own tap, hold and double-tap actions. Left empty, Morph’s own tap and hold.
Card shown when it is opened Any Lovelace card, shown under the card while it is open.

This is what the editor writes:

type: custom:morph-light-card
entity: light.kitchen_ceiling
name: Ceiling
room: Kitchen
color: amber
detail:
type: history-graph
entities:
- sensor.kitchen_temperature
hours_to_show: 24

A thermostat with script buttons on its control row:

type: custom:morph-climate-card
entity: climate.downstairs
actions:
- script.boost_heat
- script.eco_mode

A list card takes entities instead of entity:

type: custom:morph-list-card
name: Doors & windows
entities:
- binary_sensor.front_door
- binary_sensor.back_door
- binary_sensor.kitchen_window

Resize a card

In a sections view each Morph card starts at a size that suits it: a light one row, a reading two, a thermostat two rows the full width, a camera or a forecast three.

Resize it with Home Assistant’s handles or the editor’s Layout tab. The card fills whatever you give it: a taller light is a bigger slider, and a small card drops its smaller lines. Holding a card open moves the cards below it down until you close it.

brAIn’s cases and Ask, as cards

Morph · brAIn’s cases (custom:morph-cases-card) shows what brAIn wants you to know or decide, each case with a reply line. Put one in each room section and cases appear in the room they are about.

type: custom:morph-cases-card
title: Kitchen
area: kitchen
Set Shows
area Cases about that area.
entities Cases about those entities.
Neither Every case brAIn has.

Morph · Ask (custom:morph-ask-card) is the Ask or tell the house… line. A question is answered on the card. A change to this dashboard becomes a Tell, made on the dashboard it was asked on.

type: custom:morph-ask-card
placeholder: Ask or tell the house…

Let brAIn change a dashboard

An administrator sees a brAIn button at the bottom right of any dashboard. On a dashboard brAIn does not look after yet, it offers Let brAIn change it. After that it offers:

Menu item What it does
Tell brAIn about a card… Tap the card you mean (the tap never presses the card), say what should change, and watch it change. brAIn gets a picture of the card and its YAML. It may also make the Home Assistant changes the request needs: a helper, a template sensor, a script. Keep and Undo work as in Morph’s Tell.
Tell brAIn about this dashboard… Tabs, layout, theme, behaviour.
History and undo Every change to this dashboard, including ones made in Home Assistant’s own editor, with Restore on each.
Morph on this tab Switches on the room rail for this tab.
Stop letting brAIn change this dashboard Leaves it exactly as it is.

A Tell’s save appears on every open screen in the house at once, with no reload.

Where a dashboard is kept

brAIn keeps each dashboard it may change as a file in Morph’s git repository:

  • Directoryconfig/
    • Directorymorph/
      • Directorydashboards/
        • default.yaml the default Overview dashboard
        • lovelace-kitchen.yaml any other, by its URL path
      • Directorytypes/ card types
        • …
      • Directorythemes/ Morph’s themes
        • …

You can edit the file too, and Home Assistant shows the change at once. Every save is one commit, whether by you, by brAIn or in HA’s own editor.

HACS cards

HACS cards keep working as installed. brAIn changes one through its own settings and, for its looks, card-mod. It never edits a HACS card’s code, which a HACS update would overwrite. When a change needs the code, brAIn makes a card type from it and says so.

How brAIn sees a dashboard

brAIn can look at any dashboard tab as Home Assistant draws it, before it answers about how one looks and again after it changes one. It does this as a system user, brAIn (screenshots), listed under Settings › People › Users. Nobody can log in as it, and nothing on a page can change anything while brAIn photographs it.

Change a dashboard’s sidebar entry

brAIn can change one card, size or setting of any dashboard without rewriting the rest. Each save is backed up and can be undone. It can also set a dashboard’s sidebar title, icon, visibility and admin-only setting through brain.update_dashboard_info, which you can call yourself:

action: brain.update_dashboard_info
data:
url_path: lovelace-kitchen
title: Kitchen
icon: mdi:silverware-fork-knife
require_admin: false
dry_run: true

Build a card type once, use it everywhere

Ask brAIn for a card and it can build it as a card type. The type appears in Add card as Morph · ‹its name›, with an editor for what each copy sets: which thermostat, which script.

  • Change the type and every copy on every dashboard changes at once.
  • When you tell brAIn about a copy, it asks whether you mean just this one or every copy.

A type is a file in /config/morph/types/, and its card is custom:morph-type-<slug>.

Kind For
template Any Lovelace card config, built-in or HACS, with [[variable]] placeholders.
element A card no existing card can draw: <slug>.js beside the YAML, whose default export is the card’s class.

/config/morph/types/thermostat-buttons.yaml:

name: Thermostat with buttons
description: A thermostat and the scripts that go with it.
kind: template
variables:
- name: entity
label: Thermostat
required: true
selector:
entity:
filter:
- domain: climate
- name: boost
label: Boost script
selector:
entity:
filter:
- domain: script
card:
type: vertical-stack
cards:
- type: thermostat
entity: "[[entity]]"
- type: button
entity: "[[boost]]"
name: Boost

A copy on a dashboard holds only its variables:

type: custom:morph-type-thermostat-buttons
entity: climate.bedroom
boost: script.bedroom_boost

[[name]] alone is the value itself, so a list stays a list. Inside a longer string it is the value as text. A variable nobody set leaves its key out.

Add the room rail to a tab

On any sections tab, press the brAIn button › Morph on this tab. On a phone or tablet, swipe the strip at the right edge left and slide from room to room. Each section is a stop, coloured by its state.

Home Assistant still lays out, edits and sizes the tab. Nothing reorders or folds, and the rail is off in edit mode.

In YAML it is one key on the view:

views:
- title: Home
type: sections
morph:
rail: true
sections:
- type: grid
cards:
- type: heading
heading: Kitchen
- type: custom:morph-light-card
entity: light.kitchen_ceiling
- type: custom:morph-cases-card
area: kitchen

Use Morph’s themes

Morph’s looks are Home Assistant themes. They are in your profile’s theme list with no setup.

Theme Looks
Morph Light and dark, following each person’s own setting.
Morph Light Always light.
Morph Dark Always dark.
Morph Medium Between the two.

They live in /config/morph/themes/ as ordinary theme files. Tell brAIn “make the cards rounder” and every open screen repaints. A theme change is a commit, so Undo puts it back. Any other theme dresses Morph’s cards too.

Bring your Morph dashboard over

While you still have a Morph dashboard in brAIn’s first tab, the brAIn button offers Bring over your Morph dashboard…. It makes a new Home Assistant dashboard, Home, in the sidebar:

  • each floor becomes a sections tab with the room rail on;
  • each room becomes a section, and a switch from its title row goes on its heading;
  • every card becomes its Morph card at the width you had set, hosted Lovelace cards stay as they were, and brAIn’s cases go in the room they are about.

It tells you what could not come along. Coming up and the verdict line stay with the Morph tab. The Morph tab itself is left as it was.

Examples

You want Do this
One card changed on the family’s Overview Let brAIn change the dashboard, tap the hallway’s tile card and say “make this a Morph light card that opens the hallway’s motion history”. The rest is untouched.
One thermostat card in five rooms Have brAIn build Thermostat with buttons as a card type and add a copy per room. Later ask for the humidity under the temperature, choose every copy, and all five change.
A wall tablet Use a sections view with morph: {rail: true} and the Morph Medium theme. Add a Morph · brAIn’s cases card to the Kitchen section for cases about the kitchen.
A HACS card that is almost right Ask brAIn to match its corners to the rest. It uses card-mod, so the next HACS update lands cleanly.