Hi,
I know this sort of thing has cropped up before, but I’ve been through all the other occurences and cannot find what I’m doing wrong.
I’m trying to get readings from solar panels by querying the inverter using MQTT
This works during the day, but as soon as they stop generating I get them showing up in the dashboard as “Entity is non-numeric”
If I look up the entitiy value in the developer tools it says “unknown”
I’ve tried all sorts so far and found the simplest looking one was to just format things as a float (this’d be fine). As you can see before, I’ve tried three different sensors three different ways but cannot get it to read zero when the value is “unknown”
sensor Solar:
- platform: mqtt
state_topic: "sbfspot_12345"
name: "Inverter Instant Power"
unique_id: "currentTotalPower"
#value_template: "{{ value_json.PACTot | int }}"
value_template: "{{ states(value_json.PACTot) | float }}"
unit_of_measurement: 'W'
device_class: power
icon: mdi:solar-power
- platform: mqtt
unique_id: "rearArrayPower"
state_topic: "sbfspot_12345"
name: "DC Power String Rear"
#value_template: "{{ value_json.PDC1 }}"
value_template: "{{ states('value_json.PDC1') | float }}"
unit_of_measurement: 'W'
device_class: power
icon: mdi:solar-power
- platform: mqtt
unique_id: "frontArrayPower"
state_topic: "sbfspot_12345"
name: "DC Power String Front"
#value_template: "{{ value_json.PDC2 }}"
value_template: "{{ value_json.PDC2 | float }}"
unit_of_measurement: 'W'
device_class: power
icon: mdi:solar-power
Can anyone help please?