I have the following error where I can not parse a JSON string from my AppDaemon Script:
Source: components/rest/sensor.py:166
Integration: RESTful (documentation, issues)
First occurred: 6:03:10 PM (1 occurrences)
Last logged: 6:03:10 PM
REST result could not be parsed as JSON
When i run a curl command i get:
{"DC:54:75:63:13:42": {"67827568-0002-0001-0001-dc5475631342": "11", "67827568-0003-0001-0001-dc5475631342": "11%", "67827568-0007-0001-0001-dc5475631342": "11", "67827568-0006-0001-0001-dc5475631342": "11", "67827568-0005-0001-0001-dc5475631342": "11", "67827568-0004-0001-0001-dc5475631342": "11"}}
Which I am trying to parse in my config file:
- platform: rest
name: ble_sensors
resource: http://192.168.0.113:5050/api/appdaemon/bleData #!env_var BLERESTAPI
headers:
Content-Type: application/json
charset: utf-8
json_attributes:
- DC:54:75:63:13:42
value_template: "OK"
scan_interval: 15
- platform: template
sensors:
sensor_1_value:
value_template: "{{ state_attr('sensor.ble_sensors', 'DC:54:75:63:13:42')['67827568-0002-0001-0001-dc5475631342'] }}"
device_class: temperature
unit_of_measurement: "°C"
sensor_2_value:
value_template: "{{ state_attr('sensor.ble_sensors', 'DC:54:75:63:13:42')['67827568-0003-0001-0001-dc5475631342'] }}"
sensor_3_value:
value_template: "{{ state_attr('sensor.ble_sensors', 'DC:54:75:63:13:42')['67827568-0004-0001-0001-dc5475631342'] }}"
sensor_4_value:
value_template: "{{ state_attr('sensor.ble_sensors', 'DC:54:75:63:13:42')['67827568-0005-0001-0001-dc5475631342'] }}"
sensor_5_value:
value_template: "{{ state_attr('sensor.ble_sensors', 'DC:54:75:63:13:42')['67827568-0006-0001-0001-dc5475631342'] }}"
sensor_6_value:
value_template: "{{ state_attr('sensor.ble_sensors', 'DC:54:75:63:13:42')['67827568-0007-0001-0001-dc5475631342'] }}"
I can’t see the obvious issue/I am after some tips for how to work out what HA is after from AD.