tijsverkoyen / HomeAssistant-EnergyID

Integrate EnergyID into your Home Assistant.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to find meter number?

liviooo opened this issue · comments

I try to set my Tesla mileage on a daily basis in EnergyID via an automation. But having troubles finding the correct EnergyID meter number for this meter. I use the meter number from the EnergyID url for that specific meter, but this doesn't work. Any idea?

service: energy_id.set_meter_reading
data:
  device_id: 97c1470-1a60-4462-b270-42841143cf1a2
  value: '{{ (states(''sensor.tesla_odometer'') | float) }}'
  date: '{{ (now() - timedelta(hours=2)).strftime(''%Y-%m-%d %H:%M'') }}'
enabled: true

Error: Stopped because an error was encountered at October 4, 2023, 20:24:52 (runtime: 0.02 seconds)
Meter not found

You will need to use the device ID for that meter in Home Assistant instead of the meter GUID from the Energy ID url.

If you use the visual mode in Home Assistant to configure an automation you can select the devices from a list.
If you want to use YAML, you can find the device ID in the url if you open the device through Settings → Devices & Services →
EnergyID → X Devices → Select the meter you want to update. This will get you to an URL like: http://127.0.0.1:8123/config/devices/device/fXX1ff61047b4d59807d0a7a03cf7f8f, fXX1ff61047b4d59807d0a7a03cf7f8f is the device_id.