Skip to content

FoxXxHater/leasing-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

54 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš— Leasing Tracker for Home Assistant

Leasing Tracker Banner

GitHub Release License HACS

A custom integration for Home Assistant to monitor leased vehicles and calculate remaining kilometers.

๐Ÿ“ธ Screenshot

Dashboard Screenshot

A huge Thanks to all great Dev out there!


โœจ Features

  • โœ… 22 automatic sensors - Comprehensive monitoring of all leasing data
  • โœ… Actual + estimated values
  • โœ… UI configuration - No YAML configuration needed
  • โœ… Multiple vehicles - Any number of leasing contracts in parallel
  • โœ… HACS compatible - Easy installation and updates
  • โœ… German + English - Full translations

๐Ÿ“ฆ Companion project

My Leasing Tracker Card

๐Ÿ“Š Sensors

Remaining Kilometers

  • Remaining KM Total
  • Remaining KM this year (actual)
  • Remaining KM this month (actual)
  • Estimated remaining KM this year
  • Estimated remaining KM this month

Driven Kilometers

  • Driven KM (total)
  • Driven KM this month
  • Driven KM this year
  • Average KM per day
  • Average KM per month

Status & Progress

  • Status (On Track / Over Plan / Under Plan)
  • KM difference to plan
  • Progress (%)
  • Remaining days/months

Contract Data

  • Allowed KM total
  • Allowed KM this year
  • Allowed KM this month
  • Allowed KM per month (average)

๐Ÿš€ Installation

Via HACS (recommended)

  1. Open HACS in Home Assistant
  2. "Integrations" โ†’ โ‹ฎ โ†’ "Custom Repositories"
  3. Add repository:
    • URL: https://github.com/foxxxhater/leasing-tracker
    • Category: "Integration"
  4. Search for "Leasing Tracker" and install
  5. Restart Home Assistant
  6. Add integration via UI

Manual

  1. Download the latest version: Releases
  2. Extract the archive
  3. Copy the leasing_tracker folder to custom_components/
  4. Restart Home Assistant
  5. Add integration via UI

โš™๏ธ Configuration

Step 1: Create mileage sensor (Optional)

(If no entity from your car is available)

Add to configuration.yaml:

input_number:
  car_mileage:
    name: "Car Mileage"
    min: 0
    max: 500000
    step: 1
    unit_of_measurement: "km"
    icon: mdi:counter

Step 2: Add integration

  1. Settings โ†’ Devices & Services
  2. + Add Integration
  3. Search: "Leasing Tracker"
  4. Fill out the form:
    • Name (e.g. "BMW 3 Series Leasing")
    • Mileage sensor
    • Start/end date
    • Starting KM
    • Allowed KM/year

Step 3: Done! ๐ŸŽ‰

All sensors are created automatically and update whenever the mileage changes.

๐Ÿ“ฑ Dashboard Examples

Compact Overview

type: entities
title: ๐Ÿš— My Leasing
entities:
  - sensor.bmw_3er_status
  - sensor.bmw_3er_verbleibende_km_monat
  - sensor.bmw_3er_verbleibende_km_jahr
  - sensor.bmw_3er_km_differenz_zum_plan
  - sensor.bmw_3er_gefahrene_km

๐Ÿ”” Example Automation

Notification when mileage is too high:

automation:
  - alias: "Leasing Warning"
    trigger:
      platform: numeric_state
      entity_id: sensor.bmw_3er_km_differenz_zum_plan
      above: 500
    action:
      service: notify.mobile_app
      data:
        title: "โš ๏ธ Leasing Warning"
        message: "You are {{ states('sensor.bmw_3er_km_differenz_zum_plan') }} km over the plan!"

๐Ÿ“š Documentation

๐Ÿ› Bugs & Issues

โ†’ Create an issue

๐Ÿค Contributing

Contributions are welcome!

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see LICENSE for details.

๐Ÿ’ฌ Support

โญ Thanks!

If this integration helps you, feel free to give the project a star! โญ


Developed with โค๏ธ for the Home Assistant Community

P.S. with kind support from Claude

About

A custom integration for Home Assistant to monitor leased vehicles and calculate remaining mileage.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages