Quick answer
Build it with the Picture elements card. Give the card a floor plan image, then place icons, badges and labels on top at set positions. Each element can show or control one entity. For more advanced effects, layer conditional images or use a community card.
What you need
- A floor plan image. A plain 2D drawing, an illustrated map or a 3D render. PNG or JPG works well as the card’s background.
- A place to store the image. Files in
/config/www/are served at/local/, so/config/www/floorplan.pngbecomes/local/floorplan.png. Use whichever file access method you have set up, such as the Samba share or an editor add-on. - Entities for the devices you want to show, such as lights, sensors, thermostats and media players.
Step 1: Create a panel view
Open your dashboard, choose Edit, and add a view. Set the view type to Panel. A panel view gives one card the full width of the screen, which suits a floor plan.
Step 2: Add a Picture elements card
Add a Picture elements card and set the background image. In YAML, it looks like this:
type: picture-elements
image: /local/floorplan.png
elements:
- type: state-icon
entity: light.kitchen
tap_action:
action: toggle
style:
top: 40%
left: 25%
- type: state-label
entity: sensor.living_room_temperature
style:
top: 60%
left: 70%
Positions use CSS percentages of the image. An element placed at 40% from the top stays in the same spot on the plan when the card resizes. Each element is centred on its point by default.
Step 3: Add more element types
The main element types are:
state-icon: an icon that changes with the entity’s state and can toggle it on tap.state-badge: a small badge showing a value or state.state-label: text showing the state or an attribute.icon: a fixed icon, often used as a button for an action.image: a picture placed on the plan, such as a door sprite.conditional: child elements shown only when conditions are met.
Element names and options change between versions, so check the Picture elements documentation for your install before copying an example.
Step 4: Show state with conditional elements
A conditional element lets you show a glow, a motion marker or an alternate image only when something is true, such as a light being on. The exact syntax changes across versions, so copy the pattern from current documentation rather than from an older post.
Step 5: Test on the real screen
Check the plan on the screen it will live on. Icons that look right on a desktop can be too small on a wall tablet. Move elements, resize icons and check that labels don’t overlap. If you also view the plan on a phone, consider a separate view or dashboard for smaller screens.
Community options
- Easy Floorplan is a community card for drawing walls, doors, windows and rooms inside Home Assistant. It’s installed through HACS. Check its repository for the current install steps.
- ha-floorplan maps entities to shapes in an SVG file, so shapes can change colour or trigger actions. It suits people who already have a vector drawing. Check its documentation for setup.
- 3D renders give realistic lighting. You render each lighting state as its own image, then switch between them with conditional elements or templates. Producing the images takes more work than a flat drawing.
Common problems
- The image doesn’t load. Check the path.
/local/maps to thewwwfolder inside your config folder, and a path that doesn’t match exactly shows a broken image. - Elements sit in the wrong place. Recheck the percentages. Top and left are measured from the top-left corner of the image.
- Icons don’t change. Confirm the entity ID is correct and that the entity is updating.
Related guides
- Home Assistant dashboards covers views, panels and basic card layout.
- Showing device locations on a map is the option if you want real-world positions instead of a drawing.
- Wall-mounted touchscreens helps you choose a screen to display the plan on.