I have a text sensor that subscribes to a topic which is formatted in json.
I want to pull out one pair of data and add that value to a sensor in esphome.
Is there an easy way to have this “temperature”:17.11, extracted from the json text and create a sensor called “Outside Temperature”?
I am guessing some sort of lambda is involved but thats a bit above my head!
From googling it, I can see a sensor that pulls info via http and extracts values all as part of one lambda but not sure if subscribing to mqtt would work the same.
There is a json component which uses ArduinoJson (although it works fine with ESP-IDF also).
With that, you will need a bit of a lambda, but it’s quite simple.
Something like this: