Consume Api of stromhaltig.de

Hi there,
I try to consume https://mix.stromhaltig.de/gsi/json/idx/69231.json
I tried several variants…

I already consume spacex data which works perfectly as described in home-assistant documentation. But the stromhaltig json attributs doesn’t show up. Any ideas?

Thanks in advance!

Logs needed

Hey,
so the coding would be correct? How would it lok like if you wanted to consume the data?

Here are the logs as far as I could finde some:

Log Details (WARNING)
Mon Oct 22 2018 07:28:10 GMT+0200 (Mitteleuropäische Sommerzeit)
JSON result was not a dictionary

Log Details (ERROR)
Mon Oct 22 2018 07:25:02 GMT+0200 (Mitteleuropäische Sommerzeit)
Error executing query: (sqlite3.DatabaseError) database disk image is malformed [SQL: ‘INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (?, ?, ?, ?, ?)’] [parameters: (‘service_registered’, ‘{“domain”: “recorder”, “service”: “purge”}’, ‘LOCAL’, ‘2018-10-22 05:24:17.709502’, ‘2018-10-22 05:25:02.595016’)] (Background on this error at: Error Messages — SQLAlchemy 2.0 Documentation)

Log Details (WARNING)
Mon Oct 22 2018 07:24:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Setup of config is taking over 10 seconds.

None of those look related to me. Have you tried

grep sensor.sensorname homeassistant.log

(substitute the proper sensorname)

Isn’t the difficulty that the url returns many data points, with nothing to distinguish them, ie 36 pairs of data. How do you tell it which pair you want?

Each pair stands for one hour and it corresponding data. The service delivers 36h forecast of green power share in my local power network.

I think I have issues with my hassio image and need to reinstall it. One issue is that I don’t have any logs in my logbook atm and can’t update from 0.75.2. since I get error “invalid config” for recorder, history and logbook after update…

I hoped that I just did wrong fetching of data which could easily fixed by the experts here :slight_smile:

This may help?

YES! Thanks a lot! That was the magical right hint!

  - platform: rest
    name: Strom
    json_attributes:
     - eevalue
    value_template: '{{ value_json[0].eevalue }}'
    resource: 'https://mix.stromhaltig.de/gsi/json/idx/XXXXX.json'