Ok.
1.) Do you know where the main directory of the HA software is located on your system? This directory does contain files like “automations.yaml” and/or “configuration.yaml”.
2.) Do you know how to manipulate files on your system?
If yes to both:
1.) Make a backup of the “configuration.yaml” file and a backup of the “secrets.yaml” file (if it already exists). With these copies you can always go back to the current state of HA. Just copy the backup files over the manipulated files in case of emergency.
2.) Start with the creation/manipulation of a file called “secrets.yaml”. If it does exist already, just change it - else create an empty file. Append the contents marked as “secrets.yaml” from my first post into that file and change the URL to the URL that does work for you. Save the “secrets.yaml” file.
3.) Look into the file called “configuration.yaml”. Is there somewhere a line with the text “sensor:” starting at the very first column?
3a.) If not: Copy the complete content marked as “configuration.yaml” from my first post into that file right above the first line at the bottom containing the text “!include”.
3b.) If the text “sensor:” does exist at the very first column somewhere in your “configuration.yaml”: Copy the complete content marked as “configuration.yaml” from my first post below that line starting with “sensor:” at the very first column. You need to leave out the first line containing “sensor:” from my contents in that case.
3c.) In my code you’ll find a calculation that starts with “8300 * 0.9”. 8300 represents the usable W of my three Q-Save Batteries. Depending on your installation you need to change that to 5500, 8300 or 11000:
4.) Navigate in your HA to the menu entry “Entwicklerwerkzeuge”. Under the Tab “YAML” you’ll see a link “Konfiguration prüfen”. Hit that. It will output “Success” in green or “Failure” in red.
On “failure” we need to investigate the error. Please post the error message here. Remember: You can always go back with your backup files.
5.) Only on success!!! Restart HA. It’s the link on the right “Neu starten”.
After the restart you should see the QCells sensors on “Einstellungen → Geräte & Dienste → Entitäten”. Filter for QCells and they will appear. Give them at least 5 minutes to show values on their “Info” tabs because five minutes is the intervall to fetch data from the QCells cloud.
6.) Now we need to add 5 (five) “Helpers” (Einstellungen → Geräte & Dienste → Helfer) of type “Integration - RiemannIntegralSensor”. The five sensors you need to create these Helpers for are:
QCells Cloud Battery Charge
QCells Cloud Battery Discharge
QCells Cloud Grid Feed
QCells Cloud Grid Load
QCells Inverter DC PV power sum
Simply add " kh" to the Helper Names in these five dialog, choose “left”, “2 digits”, “Kilo” and “Hour” as parameters always.
Create them as follows (example on QCells Cloud Battery Charge):
At the end it looks like that:
After that everything is working. Hit “Einstellungen → Dashboards ->Energy”. Here you can add the Helpers (those with the trailing “kh”) to “QCells Cloud Battery Charge kh”, “QCells Cloud Battery Discharge kh” in the Battery section. In addition add the “QCells Inverter DC PV power sum kh” to the Solar section. If you’ve setup a weather card, simply add that as solar forecast.
Now we are hitting a point where you need to decide if you want to track cost and income. If you want - look at this example for cost and income:
template:
- sensor:
- name: "Strompreis"
unit_of_measurement: "EUR/kWh"
icon: mdi:currency-eur
state: >
{% if now().strftime("%Y%m%d") >= "20230101" %}
{{ 0.5498 }}
{% elif now().strftime("%Y%m%d") >= "20220801" %}
{{ 0.305 }}
{% elif now().strftime("%Y%m%d") >= "20220701" %}
{{ 0.2371 }}
{% elif now().strftime("%Y%m%d") >= "20200401" %}
{{ 0.2814 }}
{% elif now().strftime("%Y%m%d") >= "20190401" %}
{{ 0.2582 }}
{% else %}
{{ 0 }}
{% endif %}
- sensor:
- name: "Einspeisevergütung Strom"
unit_of_measurement: "EUR/kWh"
icon: mdi:currency-eur
state: >
{% if now().strftime("%Y%m%d") >= "20190604" %}
{{ 0.1095 }}
{% else %}
{{ 0 }}
{% endif %}
If you don’t want to track cost and income simply add “QCells Cloud Grid Feed” as “Zurück ins Netz” and “QCells Cloud Grid Load” as “Netzverbrauch” in the Energy Dashboard settings. It looks like that then:
I you want, you can now add additional cards of your choice everywhere ony your dashboards for these sensors (this time without the trailing “kh”):
QCells Inverter DC PV power sum → current Solar production (W)
QCells BMS energy SOC → current battery level (%)
QCells Inverter DC Battery power total → what’s going in or out of battery (W, +/-)
QCells Grid power total → what’s going in or out from/to the net (W, +/-)
QCells Cloud House Load → load of your home (W)
QCells Cloud Solar plus Battery total → total of current solar production and battery capacity
… and a lot more