Hi,
I’m trying to create a MQTT sensor but I can’t get it to work, value is shown as unknown.
Here is my sensor (configuration.yaml):
mqtt:
sensor:
- name: "S1000 total capacity"
state_topic: "storcube/reportEquip"
value_template: "{{ value_json.1234567890.totalCapacity }}"
unique_id: "s1000_total_capacity"
Here is message I get:
{
"1234567890": {
"totalPv1power": 28,
"totalInvPower": 0,
"list": [
{
"equipId": "1234567890",
"temp": 6,
"soc": 30,
"capacity": 812
}
],
"plugPower": 0,
"totalCapacity": 812,
"mainEquipId": "1234567890",
"totalPv2power": 24
}
}
I can get MQTT messages if I connect to my environment with MQTT Explorer.
Mosquitto is installed on my HA environment and MQTT integration is configured.
Thanks for your help.