@Troon Thank you for the quick reply. I am not getting an error in HA (like what’s mentioned in this post). The issue might be something else. Heck, I don’t even know if the code I posted in the OP is correct. Maybe I’m doing something wrong?
Anyway, I am able to create two separate REST sensors (and respective REST calls) which does work for me. I’m not sure why the below code works; where the other code doesn’t:
- platform: rest
resource: http://192.168.1.2:61208/api/3/network
name: Glances Download Speed
value_template: '{{ ( value_json[0].rx / 1000000 ) | round(2) }}'
unit_of_measurement: "Mbps"
scan_interval: 5
- platform: rest
resource: http://192.168.1.2:61208/api/3/network
name: Glances Upload Speed
value_template: '{{ ( value_json[0].tx / 1000000 ) | round(2) }}'
unit_of_measurement: "Mbps"
scan_interval: 5