Hi guys.
need your help.
The main idea is to produce a report of how much electricity each of the electric vehicles consumed when charging.
There is a sensor to read the electricity consumed (TUYA unfortunately)
-I built an automation when a tracker detects that the charger is connected, a message pops up to the mobile asking which of the vehicles is connected to charger A or B.
What I can’t do is split the report according to the trigger. or trigger costum sensor.
I would appreciate your assistance
Or even think in a different direction?
Idea how I would solve it:
Create an utility meter with your tuya sensor and 2 different tariffs for your 2 cars.
See the advanced configuration in the docs: Utility Meter - Home Assistant
Although you are in fact not dealing with actual tariffs, the result is exactly what you need: one sensor each with the energy consumption per car.
In the docs you can also see an example for an automation to choose the tariff. You need to tweak it that the tariff changes when the actionable notification from your phone fires. Press car A on the phone → change to tariff A
Unit of measure depends on your input sensor and its integration. If the integration doesn’t allow configuration you can always make a template sensor and use it as input in the utility meter.
Automation that runs once per month:
or
or a graph of the monthly usage of the utility meter