Hello,
can anyone help out? I am trying to gather data from the scooter rental service Tier. They have an API that can display how many scooters are placed around a defined lattitude/longitude and a given radius. The API response contains how many scooters are around and also some useful stats like remaining battery. I’d love to display these information in a list-card which requires data as a list. But I am not quite sure how to do this. I tried to create a command line sensor:
- platform: command_line
name: Tier Scooter
command: 'curl "https://platform.tier-services.io/v2/vehicle?lat=54.32&lng=10.13&radius=1000" -H "x-api-key: bpEUTJEBTf74oGRWxaIcW7aeZMzDDODe1yBoSxi2"'
scan_interval: 300
But the returned data is too large and hass log shows an error:
homeassistant.exceptions.InvalidStateError: Invalid state encountered for entity id: sensor.tier_scooter. State max length is 255 characters.
So my Question is:
What would be the best way to store the large API response in a list format and hand the data over to the list card?