PHEV Relative Consumption — Combine fuel and electricity into one comparable figure

I drive a VW Tiguan eHybrid and kept staring at two disconnected numbers: 6.x l/100 km and 17.x kWh/100 km. Neither tells you how efficient a drive actually was — the car’s lifetime averages mix charging habits, seasons and route types into one blur, and the trip computer resets after every ignition cycle, so per-trip numbers vanish unless you catch them right away.

So I built a small package that produces one number in litres per 100 km: real fuel use plus electricity converted through a personal kWh→litre exchange rate (ref_ev / ref_fuel) that reflects how my car actually converts energy — n

ot a theoretical constant (conversion methods per E3S Web of Conferences 2021).

The trick: the two baselines behind that exchange rate are not static. After every trip over 10 km, an automation blends each trip’s real consumption into its baseline with an EMA of 90 % old + 10 % new, with sanity ranges so one glitch can’t poison them. The weight is fixed 0.10 on purpose — documented in code; 90/10 converged cleanly over months of testing.

relative = lifetime_fuel + lifetime_electric / (ref_ev / ref_fuel)
baseline = 0.9 × baseline + 0.1 × trip_value

Three components, no custom integrations: 2 × input_number baselines, 1 template sensor, 1 automation. Works with any integration reporting lifetime + last-trip consumption (VW Group via vag_connect-style entities, manufacturer clouds, OBD…).

Full package YAML, setup guide and the reasoning behind the formula: GitHub - arvcer/ha-phev-relative-consumption: Shows your plug-in hybrid's true efficiency as one number (L/100 km) — petrol + electricity combined. Home Assistant, no custom integrations. · GitHub

Happy to answer questions — especially curious how other PHEV owners’ exchange rates differ.

Why did you let that AI – or LLM – make the title of that Github – Repository three – lines of gobbly – gook that no – one understands?

Fair point :grinning_face_with_smiling_eyes: PHEV Relative Consumption is the project name. the rest is just the description. I agree it’s a bit too clever — simplify it.