Versioner sammenlignet

Nøgle

  • Linjen blev tilføjet.
  • Denne linje blev fjernet.
  • Formatering blev ændret.

...

Kodeblok
- platform: rest
  name: Toyota RAV4 Fuel
  resource: http://127.0.0.1/mytoyota/odometer.json
  method: GET
  value_template: '{{ value_json.1.value }}'
  unit_of_measurement: Pct
  scan_interval: 3000

- platform: rest
  name: Toyota RAV4 Mileage
  resource: http://127.0.0.1/mytoyota/odometer.json
  method: GET
  value_template: '{{ value_json.0.value }}'
  unit_of_measurement: Km
  scan_interval: 3000

- platform: rest
  name: Toyota RAV4 Gasoline Travelable Distance
  resource: http://127.0.0.1/mytoyota/remote_control.json
  method: GET
  value_template: '{{ value_json.VehicleInfo.ChargeInfo.GasolineTravelableDistance }}'
  unit_of_measurement: Km
  scan_interval: 3000

- platform: rest
  name: Toyota RAV4 EV Travelable Distance (with EC)
  resource: http://127.0.0.1/mytoyota/remote_control.json
  method: GET
  value_template: '{{ value_json.VehicleInfo.ChargeInfo.EvDistanceWithAirCoInKm }}'
  unit_of_measurement: Km
  scan_interval: 3000

- platform: rest
  name: Toyota RAV4 EV Travelable Distance (without EC)
  resource: http://127.0.0.1/mytoyota/remote_control.json
  method: GET
  value_template: '{{ value_json.VehicleInfo.ChargeInfo.EvTravelableDistance }}'
  unit_of_measurement: Km
  scan_interval: 3000

- platform: rest
  name: Toyota RAV4 Inside Temperature
  resource: http://127.0.0.1/mytoyota/remote_control.json
  method: GET
  value_template: '{{ value_json.VehicleInfo.RemoteHvacInfo.InsideTemperature }}'
  unit_of_measurement: C
  scan_interval: 3000

- platform: rest
  name: Toyota RAV4 Charging Status
  resource: http://127.0.0.1/mytoyota/remote_control.json
  method: GET
  value_template: '{{ value_json.VehicleInfo.ChargeInfo.ChargingStatus }}'
  scan_interval: 3000

- platform: rest
  name: Toyota RAV4 Parking
  resource: http://127.0.0.1/mytoyota/parking.json
  method: GET
  value_template: '{{ value_json.result }}'
  scan_interval: 3000
  json_attributes_path: $.event
  json_attributes:
    - lat
    - lon


Getting the GPS Data on a Device

Taken from https://community.home-assistant.io/t/create-a-device-tracker-from-sensor-template-gps-coordinates-from-rest-api/93993

In known_devices.yaml I create the car:

...