psa_car_controller
psa_car_controller copied to clipboard
API changes for Homeassistant
If you want to get the trips or chargings with Homeassistant RESTful Sensor into an attribute (e.g. to create a table) you need a json attribute. So we have to implement a attribute with the array to parse the trip and charge data to homeassistant.
After that you can use:
- platform: rest
name: corsa_e_trips
resource: http://xxxxx:5000/vehicles/trips?homeassistant=1
scan_interval: 60
value_template: "{{ value_json | length }}"
json_attributes:
- trips
While now you cant parse the json into an attribute and the value only allows 255 chars.
After that you can e.g. use flex-table-card to create a nice table with a list of your trips or charges.
have you tried this :
rest:
- resource: "http://xxxxx:5000/vehicles/trips?homeassistant=1"
sensor:
- name: "trips"
value_template: "{{ value_json|| length }}"