LOA - Car Lease Mileage smart home integration, free and open source

Track the mileage of a leased car (LOA/LLD): allowance, projection, extra-kilometre cost.
Your car is leased (LOA or LLD in France) with a mileage allowance: this integration tells you at any time whether you drive too much, what the odometer will read at the end of the contract at your current pace, and what the extra kilometres would cost when you return the car.
What you get
A "<vehicle name> (LOA)" device in the Discovery tab, with these values:
| Value | Meaning |
|---|---|
| Compteur kilométrique | the last reading you entered |
| Compteur prévu à date | what the odometer should read today if the allowance were spread evenly |
| Écart avec le prévu | reading − expected at the reading date; positive = you drive too much |
| Km restants au forfait | allowance − distance driven; negative once the allowance is exceeded |
| Budget km par mois | what you can still drive each month to end exactly within the allowance |
| Compteur projeté en fin de contrat | the final odometer if you keep your current pace |
| Dépassement projeté | the kilometres over the allowance in that projection |
| Surcoût projeté | projected extra kilometres × price per extra kilometre |
| Jours restants | days until the end of the contract |
The feature names are in French (LOA is a French contract); rename them in Gladys if you like. Every value keeps its history, so you can chart it on a dashboard.
The projection only appears after one week of contract: before that, a single long trip would distort it completely.
Configuration
- Open the Configuration tab of the integration and copy your contract:
- Contract start: the delivery date, as
YYYY-MM-DD(e.g.2025-03-15); - Duration in months (36 for 3 years);
- Mileage allowance for the whole contract (60,000 km for 3 years at 20,000 km/year);
- Odometer at delivery (often a few kilometres);
- Price per extra km, from the contract terms.
- Contract start: the delivery date, as
- Save, then add the device from the Discovery tab.
- Record a first odometer reading (see below).
While something is missing, the Configuration screen says what to fix.
Recording the odometer
Three ways:
- Configuration screen: the Record the odometer button. The summary shows under the button.
- Dashboard: add the Car lease widget; its New reading button opens a small form, pre-filled with the last reading. Its chart draws the allowance over the whole contract and your own pace, extended to the projected final odometer: when your line runs above the allowance line, you are driving too much.
- Scene: the Record the leased car odometer action. Handy when your
car is connected and another Gladys integration already reads its
odometer: a daily scene can pass that value on. In the Odometer (km)
field, type
{{and pick the car's odometer value from the list.
A reading a week or a month is enough: the projection uses the average pace since the delivery. A reading lower than the previous one is accepted (fixing a typo).
Scene examples
- Overage alert: "device value" trigger on Surcoût projeté above 0 → send a message.
- Return reminder: trigger on Jours restants below 90 → "book the return inspection".
- Reading reminder: scheduled trigger every Sunday → "read the car odometer".
The computation
expected(date) = odometer at delivery + allowance × (days elapsed / contract days)
delta = reading − expected(reading date)
pace = distance driven / days elapsed at the reading date
projected = odometer at delivery + pace × contract days
projected cost = max(0, projected distance − allowance) × price per extra km
budget per month = km left / months left (all of it during the last month)
The contract ends on the start date plus the duration in months (a contract started on 31 January ends on the last day of the target month).
Troubleshooting
Read the integration logs from the Gladys UI (or docker logs on the host),
with LOG_LEVEL=debug for the full detail.
Configuration settings
These are the settings LOA - Car Lease Mileage asks for in its configuration screen in Gladys.
| Setting | Type | Required | Description |
|---|---|---|---|
| Your lease contract | section | No | Copy the figures from your lease contract. Then enter the odometer from time to time (button below, dashboard widget or a scene): Gladys compares it with the allowance and projects the end of the contract. |
| Vehicle name | string | No | |
| Contract start (delivery date) | string | Yes | Format YYYY-MM-DD. |
| Duration (months) | number | Yes | |
| Mileage allowance (km) | number | Yes | For the whole contract, not per year. |
| Odometer at delivery (km) | number | No | |
| Price per extra km (€) | number | Yes | Written in the contract, usually between 0.05 and 0.20 €. |
How to install LOA - Car Lease Mileage in Gladys
- In Gladys, open Integrations: LOA - Car Lease Mileage appears in the catalog, next to the native integrations, with a community badge.
- Click Install. Gladys pulls the Docker image (
ghcr.io/nagromdark/gladys-suivi-loa-lld:1.0.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration). - Open the Configuration screen of the integration, fill in the settings, and save.
- You can also install it directly from its repository URL: https://github.com/Nagromdark/gladys-suivi-loa-lld.
LOA - Car Lease Mileage requires Gladys >=5.1.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.
Not running Gladys yet? It is free and open source: follow the installation guide to get started.
About external integrations
LOA - Car Lease Mileage is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by Nagromdark, not by the Gladys core team.
- Browse all integrations, native and community
- Build and publish your own external integration
- Source code on GitHub — source of this documentation