Hi
I have Node-Red going out to my mining provider via their API and dumping all data into an MQTT topic. I setup an MQTT Sensor that works fine.
- platform: mqtt
name: "Total Hash Rate"
state_topic: "mining/pool"
qos: 0
unit_of_measurement: "MH/s"
value_template: "{{ value_json.user.hash_rate / 1000 | round(4) }}"
The problem is the mining provider uses a . in their fields on some object fields. See below.
"workers": {
"Miner.1": {
"connected": true,
"hash_rate": 582990.8,
.....
Im not sure how to extract the data into a sensor as using a . won’t work as part of the name
Im sure this is a simple fix but Iv tried a few options using ["workers’][“Miner.1”] but I can’t seem to make it work.
Any suggestions?