0

I am trying to graph data in Azure Timeseries Insights. For the provided sensor, I can only graph the event count - none of the values provided by the JSON are available. Despite this, the raw data is clearly all present.

I can see the attribute state in the raw data, but it cannot be selected for graphing.

The raw data view:

The property selection for the entity:

The raw json (before it lands in Times Series Insights) is as follows (from another identical sensor). The entity_id and last_updated are used as the device id and update time for the event source.:

{
    "entity_id": "sensor.temperature_9",
    "state": "21.0",
    "attributes": {
        "on": true,
        "unit_of_measurement": "°C",
        "friendly_name": "XXXX Schlafzimmer Temp",
        "icon": "mdi:thermometer",
        "device_class": "temperature"
    },
    "last_changed": "2021-03-02T07:45:23.239584+00:00",
    "last_updated": "2021-03-02T07:45:23.239584+00:00",
    "context": {
        "id": "32d7edfe14b5738ee47509d026c6d5d3",
        "parent_id": null,
        "user_id": null
    }
}

How can I graph the state from raw data?

iamdave
  • 12,023
  • 3
  • 24
  • 53

1 Answers1

1

Figured it out: the state value from json is used by many objects, some report a numeric value and some an enumeration. This makes the field invalid for direct selection in a numeric data type.

Instead, a value of toDouble($event.state.String) in a type, then assigning the type to the instance, allows the correct value to be displayed.

iamdave
  • 12,023
  • 3
  • 24
  • 53