An open API service indexing awesome lists of open source software.

https://github.com/mp-se/ha-dashboard

Home assistant dashboard as a standalone app (PWA)
https://github.com/mp-se/ha-dashboard

dashboard ha home-assistant pwa vibe-coding webapp

Last synced: 3 months ago
JSON representation

Home assistant dashboard as a standalone app (PWA)

Awesome Lists containing this project

README

          

![release](https://img.shields.io/github/v/release/mp-se/ha-dashboard?label=latest%20release)
![issues](https://img.shields.io/github/issues/mp-se/ha-dashboard)
![GitHub Stars](https://img.shields.io/github/stars/mp-se/ha-dashboard)
![Docker Pulls](https://img.shields.io/docker/pulls/mpse2/ha-dashboard)
![Docker Image Size](https://img.shields.io/docker/image-size/mpse2/ha-dashboard/latest)
![GitHub Actions](https://img.shields.io/github/actions/workflow/status/mp-se/ha-dashboard/publish.yml)
![License](https://img.shields.io/github/license/mp-se/ha-dashboard)
![Last Commit](https://img.shields.io/github/last-commit/mp-se/ha-dashboard)

# Home Assistant Dashboard

A Vue.js dashboard app built with Vite that displays real-time sensor data from your local Home Assistant instance. Configure everything via a simple JSON file with support for multiple entity specification methods, dynamic filtering, and flexible card components.

## Examples

| Light Control | Switch Control | Sensor Display |
| --------------------------------- | ----------------------------------- | --------------------------------------- |
| ![Light](./images/halight-on.png) | ![Switch](./images/haswitch-on.png) | ![Sensor](./images/hasensor-single.png) |

| Binary Sensor | Gauge | Weather |
| ------------------------------------------------ | ------------------------------------- | ---------------------------------- |
| ![Binary Sensor](./images/habinarysensor-on.png) | ![Gauge](./images/hagauge-medium.png) | ![Weather](./images/haweather.png) |

| Energy Chart | Sun Info | Person Location |
| -------------------------------- | -------------------------- | ------------------------------------- |
| ![Energy](./images/haenergy.png) | ![Sun](./images/hasun.png) | ![Person](./images/haperson-home.png) |

This whole project has been an experiment to see what i could create using Github Copilot and let that do most of the coding and documenation.

Demo is available here: https://mp-se.github.io/ha-dashboard/

## ✨ Features

- **Real-time Updates**: WebSocket connection with automatic reconnection and exponential backoff
- **Area Organization**: View devices and entities grouped by Home Assistant areas with virtual area entities
- **JSON Configuration**: Entire dashboard driven by a single configuration fileβ€”no code changes needed
- **Flexible Entity Specification**: Direct references, wildcard patterns, or custom getter functions
- **Device & Area Support**: Browse devices organized by area, filter entities by area, view area entity mappings
- **Room Cards**: Advanced HaRoom component with temperature/humidity display, multi-entity controls (up to 3), and domain-specific colors
- **Responsive Design**: Dark mode support with mobile-optimized layout
- **PWA Support**: Install as a native app on any device
- **Offline Fallback**: Service worker enables offline access with cached data
- **Security**: Self-signed SSL certificate support for local LAN deployment
- **Extensible**: Component-based architecture for easy customization
- **Error Resilience**: Network failures don't break the UI; connection status always visible
- **Robust Configuration**: Detailed JSON error reporting with line/column context for malformed configs

## 🎨 Card Types

The dashboard includes 26+ pre-built card components:

**Entity Controls**: Lights, Switches, Buttons, Select, Media Player
**Displays**: Sensors, Binary Sensors, Gauges, Chips, Text, Links, Images
**Information**: Weather, Sun, Person, Energy, Alarms, Printers
**Layout**: Spacers, Headers, Rows
**Advanced**: Sensor graphs, Entity lists, Custom getters

## πŸš€ Quick Start

### 1. Prerequisites

- Docker and Docker Compose (or Node.js 18+ for development)
- Home Assistant instance with a long-lived access token

### 2. Configure the Dashboard

Edit `public/data/dashboard-config.json`:

```json
{
"app": {
"title": "My Dashboard",
"developerMode": false,
"localMode": false
},
"haConfig": {
"haUrl": "https://your-ha-instance:8123",
"accessToken": "your-long-lived-token-here"
},
"views": [
{
"name": "overview",
"label": "Overview",
"icon": "mdi mdi-view-dashboard",
"entities": [
{ "entity": "light.living_room" },
{ "entity": "sensor.temperature_*" }
]
}
]
}
```

### 3. Deploy with Docker

```bash
docker-compose up -d
```

Access at `https://localhost:8443` (or your configured domain).

## πŸ“– Documentation

- **[Installation & Deployment](./INSTALL.md)** β€” Docker setup, certificate generation, Portainer configuration
- **[Configuration Guide](./CONFIGURATION.md)** β€” JSON schema, all card types, entity specification methods, areas & devices, examples

## πŸ”’ Security Notes

- Credentials can be stored in the JSON config file or entered via the UI
- Stored credentials persist in browser localStorage
- Self-signed certificates require installation on client devices for PWA access
- Home Assistant token should be long-lived; rotate periodically in HA

## πŸ› οΈ Development

```bash
npm install
npm run dev
```

App runs at `http://localhost:5173` with hot reload enabled.

## πŸ“¦ Project Structure

```
.
β”œβ”€β”€ public/data/dashboard-config.json # Main configuration file
β”œβ”€β”€ src/
β”‚ β”œβ”€β”€ components/ # Card components
β”‚ β”œβ”€β”€ stores/haStore.js # State management
β”‚ └── App.vue # Root component
β”œβ”€β”€ docker/
β”‚ β”œβ”€β”€ Dockerfile
β”‚ β”œβ”€β”€ nginx.conf
β”‚ └── ssl/ # Certificates & generation script
└── package.json
```

## πŸ› Troubleshooting

See [INSTALL.md](./INSTALL.md) for deployment issues and [CONFIGURATION.md](./CONFIGURATION.md) for configuration problems.

## πŸ“ License

See LICENSE file for details.