Service Call custom API
under review
Mark Purcell
The Tesla custom component allows a Service call to use defined endpoints and returns the response.
This can be very useful for both POST and GET commands, setting tariffs and the like. It would be useful to add this functionality to Teslemetry.
service: tesla_custom.api
data:
command: SITE_DATA
parameters:
path_vars:
vehicle_id: "XXXXXXXXX"
site_id: "YYYYYYYY"
response:
solar_power: 2857
energy_left: 1342.2631578947367
total_pack_energy: 40777
percentage_charged: 3.2917163055024568
backup_capable: true
battery_power: -1490
load_power: 1367
grid_status: Active
grid_services_active: false
grid_power: 0
grid_services_power: 0
generator_power: 0
island_status: on_grid
storm_mode_active: false
timestamp: "2024-02-04T06:45:55
Teslemetry
under review
Your example of Site Data will be added natively as sensor entities soon, however I agree a generic API call service is a good idea and in the spirit of Teslemetry.
I'll see if there is a good way to acheive this.