Now i’d like to convert it from that mqtt payload to nordpool_raw_data “format” to read it later with apexcharts. And for that i have made mqtt sensor that should read json and put data to attributes … but in that place I do fail …
mqtt sensor:
- sensor:
name: nordpool_price_today_json
unique_id: nordpool_price_today_json
state_topic: nordpool/price/json/today
value_template: "x"
json_attributes_topic: nordpool/price/json/today
json_attributes_template: "{{ value }}"
Mostly by google come the json manipulations that want to find only one value … i’d like to have the whole thing as:
It seems i’m doing something totally wrong … but same time… what exactly.
It would be good to be able to debug it - print the array results to console but that I have no idea how to do :(.
Found a way by googling to print the array to console as well and that proved that with data all was good … just the data in and the graph start/end times where a bit off … (small mistake)
But there was one I would say interesting discovery - values need to be ‘float’ and not string (as in mqtt message). That is because if values are not float the min and max in apexcharts are totally messed …