Hi all,
for starters i want to say that i love this project and how dynamic it is, and how the community is helpful, i used this forum countless time to help improve new and existing integrations so I’m forever grateful about it.
Now i think its time to ask for help to someone that has a bit more knowledge about this than me. but first let me explain what im trying to achieve.
recently i bought a bracelet online that you sponsor an animal, in my case a whale, once you get the bracelet they provide you with a website to track its movement but i would like to integrate with HA
so i built an nodered integration that goes and fetches the date, latitude and longitude from html bit of the website then i convert it to csv
so far everything is doing fine now the part including sending to MQTT
now I’m struggling to feed this data to a entity so I can feed into the map to track something like ISS tracker.
this is what i have on configuration.yaml but its not feeding the data at all.
- platform: template
sensors:
whale_locations:
friendly_name: "Whale Locations"
value_template: >
{{ states('sensor.whale_locations_json') | from_json }}
attribute_templates:
date: >
{% set data = states('sensor.whale_locations_json') | from_json %}
{% for location in data %}
{{ location[0] }}
{% endfor %}
latitude: >
{% set data = states('sensor.whale_locations_json') | from_json %}
{% for location in data %}
{{ location[1] }}
{% endfor %}
longitude: >
{% set data = states('sensor.whale_locations_json') | from_json %}
{% for location in data %}
{{ location[2] }}
{% endfor %}
mqtt:
sensor:
- name: "Whale Locations JSON"
state_topic: "nodered/whale"
value_template: "{{ value_json }}"
i hope someone can point me on the right direction on this… and this can help someone else with a similar problem