Hello. I have tried for hours and days to try to do this simple task. All I want to do is add the values of 3 sensors that are in mqtt.yaml. I have 3 Solar Controllers and I want to add up their PV Yield for the day… I can get the PV yield for each controller from mqtt, but I can’t figure out how to add them. Thank you for any help. I have tried to make a template but don’t know where to put it or I’m just doing something wrong. I need help with making the sensor or template or platform. I’ve found several examples and don’t know the terminology. I also need to know where to put it. Does it go in mqtt.yaml or configuration.yaml? Once you help me get it figured out this time I should be having fun making lots of others. Thanks again.
This is them from mqtt.yaml:
line 1 in mqtt.yaml is sensor:
# 277 Controller PV Yeild
-
name: “Shed Front PV Yeild”
unique_id: “Cerbo2_277_PV_Yeild”
device_class: power
state_topic: “victron2/N/c0619ab2a9f9/solarcharger/277/History/Daily/0/Yield”
value_template: ‘{{ (value_json.value|float(0))|round(2) }}’
unit_of_measurement: “kWh”
icon: mdi:solar-power278 Controller PV Yeild
-
name: “Shed Roof PV Yeild”
unique_id: “Cerbo2_278_PV_Yeild”
device_class: power
state_topic: “victron2/N/c0619ab2a9f9/solarcharger/278/History/Daily/0/Yield”
value_template: ‘{{ (value_json.value|float(0))|round(2) }}’
unit_of_measurement: “kWh”
icon: mdi:solar-power288 Controller PV Yeild
-
name: “Shed Ground PV Yeild”
unique_id: “Cerbo2_288_PV_Yeild”
device_class: power
state_topic: “victron2/N/c0619ab2a9f9/solarcharger/288/History/Daily/0/Yield”
value_template: ‘{{ (value_json.value|float(0))|round(2) }}’
unit_of_measurement: “kWh”
icon: mdi:solar-power