Files
Kilometer_Logbook/home-assistant/configuration.yaml
T
2026-11-17 20:25:07 +01:00

16 lines
716 B
YAML

# Kilometer Log — add this to Home Assistant's configuration.yaml, then restart Home Assistant
# Generated from the app's Admin → Home Assistant page. Replace AB-123-C with your plate,
# and the sensor/tracker names if yours differ.
rest_command:
kilometer_log_odometer:
url: "http://kilometer-log:3000/api/ha/odometer"
method: POST
headers:
Authorization: !secret kilometer_log_auth
content_type: "application/json"
payload: >-
{"plate": "AB-123-C", "odometer": {{ odometer }}, "unit": "{{ unit }}",
"time": "{{ time }}", "latitude": {{ latitude | to_json }}, "longitude": {{ longitude | to_json }},
"location": {{ location | to_json }}, "category": "personal"}