I am using restful to take the GPS data I have and feed that to geoaplify. It gives me back response data, but I have been unable to really utilize or store that data in an entity as json variables.
Here is my rest_command in my configuration.yaml
rest_command:
timezone_get_rawdata:
url: "https://api.geoapify.com/v1/geocode/reverse?lat={{ states('sensor.victron_gps_latitude_clean')|float }}&lon={{ states('sensor.victron_gps_longitude_clean')|float }}&format=json&apiKey=xxxxxxxxxxxxxxxredactedxxxxxxxxxxxxxx"
Which when ran in developer tools action:
RESTful Command: timezone_get_rawdata
produces the following response data: (identifiable info redacted, or changed to show not my address)
content:
results:
- country_code: us
housenumber: "1234"
street: Main St
country: United States
county: Nothing Particular County
datasource:
sourcename: openaddresses
attribution: © OpenAddresses contributors
license: BSD-3-Clause License
postcode: "00000"
state: Florida
city: Anywhere
state_code: FL
lon: -xx.xxxxxx
lat: xx.xxxxxx
distance: 124.43269913164767
result_type: building
formatted: 1234 Main St, Anywhere, FL 00000, United States of America
address_line1: 1234 Main St
address_line2: Anywhere, FL 00000, United States of America
timezone:
name: America/Chicago
offset_STD: "-06:00"
offset_STD_seconds: -21600
offset_DST: "-05:00"
offset_DST_seconds: -18000
abbreviation_STD: CST
abbreviation_DST: CDT
plus_code: 862xxxxJ+2G
plus_code_short: xxxxxx, 00000 xxxxxx, United States
rank:
popularity: 1.8152377551070566
place_id: >-
51a7e8482effbd55xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx16e74615f726f73612d6164647265737365732d636f756e74793a64636535393635616132346136336338
query:
lat: xx.xxxxx
lon: -xx.xxxx
plus_code: 86xxxxx7M+X2
status: 200
What I really want to do is store all of this information in an entity with the information as attributes, that I can pull from. But then I want to be able to adjust home assistant to show that is my time zone.
I already have a set_location automation that runs every 10 minutes (this calls the above rest_command to get the updated location information), I am in an RV full-time so this can change during travel days.