№ 023 · 2026-09-25 · shipped · docker-prod-01 + home assistant

The cars moved onto the wall

home-assistantteslamatemqttmosquittoteslalovelacetelemetry

A couple of weeks ago I brought TeslaMate back from the dead and put an MCP server on top of it, so I could ask where either car was in plain English. The wall tablet in the house, though, still had nothing. Home Assistant’s Tesla integration had stopped getting data in June, when Tesla shut the API it relied on; one car had never reported at all, and the other updated when it felt like it.

The data was sitting right there. TeslaMate publishes every car’s live state over MQTT the moment it changes. Home Assistant speaks MQTT natively. They just weren’t talking to each other.

One small relay

Diagram: the two cars feed TeslaMate, whose private MQTT broker is bridged by a small relay container into Home Assistant's broker; MQTT discovery creates about thirty-five entities per car, which drive the car cards, the automations, and the same MCP server

TeslaMate’s broker is deliberately not exposed to the rest of the network, and I wanted to keep it that way. So instead of opening it up, there’s a tiny relay container that joins TeslaMate’s private network on one side and logs in to Home Assistant’s broker on the other, forwarding the car topics across. It’s a Mosquitto bridge and nothing else.

On the Home Assistant side, a short script publishes discovery messages, and both cars simply appear: about thirty-five sensors each — battery, range, charge state, locks, doors, windows, tyres, speed, location, the active navigation route — plus one sensor for the relay itself, so the dashboard can tell me when the link is down rather than showing stale numbers as if they were fresh.

Cards that tell you something

The part I wanted most was a card per car that answers the question you actually have when you glance at the wall. These are the real cards, fed simulated states so I could show all three at once:

Three car cards with simulated states: one driving with a green border, a progress bar and a small car icon, its ETA and miles remaining; one charging with a green charge bar filling towards its limit; and one parked away and unlocked with a red border and a warning line

Here’s the driving card running — the little car moves as the miles count down:

Animated: the driving card's progress bar fills and the car icon moves along it as the miles to arrival count down

The “parked since” bug

The parked card says how long the car has been sitting there. The first version read that from Home Assistant’s own “last changed” timestamp, and it was wrong all the time — because every time Home Assistant restarts, “last changed” resets to the restart. Everything had apparently been parked since I last updated something.

The fix is an automation that stamps the time into a helper at the moment the car shifts out of drive. That time survives restarts, because it’s a value, not a side-effect.

The full page

The cars also got their own page: where they are, a two-day battery chart, and a compact grid of everything per car.

The cars page: a map (blurred) and a 48-hour battery chart, then for each car a grid of battery, range, locks, doors, climate and tyre pressures, with a one-line summary

The map is blurred for the same reason the cameras are elsewhere on this blog. The rest is what the wall shows every day — and for the first time since June, it’s live.