Hi Guys, been wracking my brain over this issue and been looking but can’t find answers to my problem. maybe someone can help?
So a while back I added the System monitor code to my confg.yaml file to monitor my system setup,
All was working fine.
2 Months ago I installed solar panels and and I had to resort to creating some template sensors that did some calculations I needed.
This was created in a separate file which I called sensors.yaml and I included this in my config.yaml file.
It looks like this:
- platform: template
sensors:
convert_grid_power:
unique_id: convert_grid_power
friendly_name: "Grid Power Watts"
value_template: "{{ states('sensor.solarnet_power_grid') | float * 1000 | round(2) }}"
convert_power_photovoltaics:
unique_id: convert_power_photovoltaics
friendly_name: "Power Photovoltaics W"
value_template: "{{ states('sensor.solarnet_power_photovoltaics') | float * 1000 | round(2) }}"
convert_solar_day:
unique_id: convert_solar_day
friendly_name: "Solar Day W"
value_template: "{{ states('sensor.symo_advanced_15_0_3_m_1_energy_days') | float * 1000 | round(2) }}"
convert_charge_power:
unique_id: convert_charge_power
friendly_name: "Charge Power KW"
value_template: "{{ (states('sensor.wattpilot_charging_energy') | float / 1000) | round(2) }}"
house_daily_load:
unique_id: house_daily_load
friendly_name: "House Daily Load"
value_template: "{{ (states('sensor.daily_energy_import') | float + states('sensor.solarnet_energy_day') | float - states('sensor.convert_daily_energy_export') | float )}}"
essential_load:
unique_id: essential_load
friendly_name: "Essential Load"
value_template: "{{ (states('sensor.symo_advanced_15_0_3_m_1_ac_power') | float + states('sensor.convert_grid_power') | float )}}"
convert_daily_energy_export:
unique_id: convert_daily_energy_export
friendly_name: "Daily Energy Export KW"
value_template: "{{ (states('sensor.daily_energy_export') | float / 1000) | round(2) }}"
house_average_voltage:
unique_id: house_average_voltage
friendly_name: "House Average Voltage"
value_template: "{{ ((states('sensor.smart_meter_ts_65a_3_voltage_phase_1') | float + states('sensor.smart_meter_ts_65a_3_voltage_phase_2') | float + states('sensor.smart_meter_ts_65a_3_voltage_phase_3') | float ) /3) | round(2) }}"
Note that line 2 has “sensors” and in my config.yaml I had to include “sensor: !include sensors.yaml”
This of course created a problem as “sensor”" was now duplicated: one with the include and one with the start of the system monitor code:
sensor:
- platform: systemmonitor
resources:
- type: disk_use_percent
arg: /config
- type: memory_free
So i removed the system monitor code from the config.yaml file and placed it my sensors.yaml file but again the problem of sensors vs sensor.
I removed the sensor line but still nothing works.
So I am stumped. Any help would appreciated on how i can integrate the system monitor into my sensors file, or any other viable solution that would work.