Home Assistant : Q&A, Tips & Tricks, Your Configs

What did you exactly do?

View attachment 1349598

I need to sit down and read @SauRoNZA post from a few days. I think I still have some other work to do first. Sucks not having enough time to read.
I added the helpers in the UI and then added device_class in my customizations YAML.

When adding the helpers, select left for the integration method. This is more accurate for these types of devices.
 
What did you exactly do?

View attachment 1349598

I need to sit down and read @SauRoNZA post from a few days. I think I still have some other work to do first. Sucks not having enough time to read.

What you have there is just the source of the sensor.

You need one that reads in kWh, as in consumption over time…not in real time.

So you'll need something like this in YAML (your on your own in the GUI I'm afraid)

configuration.yaml
Code:
sensor: !include sensors.yaml
sensors.yaml
Code:
 - platform: integration
    source: sensor.geyser_power (<<<<<< CBI Bathroom Geyser - Power) 
    name: geyser_energy
    unit_prefix: k
    round: 2
    method: left
customize.yaml
Code:
sensor.geyser_energy:
   device_class: energy
 
Last edited:
What you have there is just the source of the sensor.

You need one that reads in kWh, as in consumption over time…not in real time.

So you'll need something like this in YAML (your on your own in the GUI I'm afraid)

configuration.yaml
Code:
sensor: !include sensors.yaml
sensors.yaml
Code:
- platform: integration
source: sensor.geyser_power ( name: geyser_energy
unit_prefix: k
round: 2
method: left
customize.yaml
Code:
sensor.geyser_energy:
device_class: energy
GUI is crazy easy. Settings -&gt; Devices and Services -&gt; Helpers -&gt; Create Helper -&gt; integration - Riemann sum.

Edit: for anyone who hasn't been following the discussion, for CBI Astute on localtuya you need to add device_class: energy in your customisation YAML.
 
GUI is crazy easy. Settings -> Devices and Services -> Helpers -> Create Helper -> integration - Riemann sum.

I'm going to guess that if I try to replace with YAML with that it's going to break something and destroy my stats.

Will wait until it self-migrates.
 
Exactly, last week I created 4 Riemann sum helpers for my four Astutes (Left, 2 decimal, hour). They then appeared for use inside Energy dashboard (without me needing to touch YAML).

What didn't happen was that it was not resetting on a daily basis. The kWh usage was increasing daily.

Today, I have deleted all the helpers, and created again with a different name. Also added them to the customisation.yaml file as recommended by @SauRoNZA . Now just waiting to see when the energy data pull through. Thanks so much!!
 
Exactly, last week I created 4 Riemann sum helpers for my four Astutes (Left, 2 decimal, hour). They then appeared for use inside Energy dashboard (without me needing to touch YAML).

What didn't happen was that it was not resetting on a daily basis. The kWh usage was increasing daily.

Today, I have deleted all the helpers, and created again with a different name. Also added them to the customisation.yaml file as recommended by @SauRoNZA . Now just waiting to see when the energy data pull through. Thanks so much!!

It's normal for the sensor to do that, it doesn't reset daily it's always a total.

The Energy Dashboard should reset it and give you the stats breakdown as you like it.

My Geyser sensor is at 1,621.25 kWh, whereas my Energy Dashboard usage for the day is 10.4 kWh
 
It's normal for the sensor to do that, it doesn't reset daily it's always a total.

The Energy Dashboard should reset it and give you the stats breakdown as you like it.

My Geyser sensor is at 1,621.25 kWh, whereas my Energy Dashboard usage for the day is 10.4 kWh
I used the same graphs I had for my sonoff - just changed sensor to the CBI one. But when it was using the sonoff sensor, it only showed for the day , hence I thought I did something wrong.

I actually think , that there is no need for the energy directives in the customise.yaml file

Reason:-
1. On my first attempt at creating the riemann sensor, they were immediately actually available to use inside energy dashboard. This was last week. I was just not getting the data I was expecting on that graph (radial chart) as explained above hence I thought I missed something

Anyway, I have your config now, and it's working as expected.


While checking the YAML files (hardly a reason to go there nowadays since everything is nearly done in UI) , I noticed that all the sensors I had manually configured for my sonoffs for energy reading, years ago have wierd messages about it 'string does not match pattern of DEPRECATED, but everything works and HA itself is happy with file. I assume this was migrated to UI or handled via Tasmota integration now - but I ain't touching this file! Saw something similar for some covers in my cover file
Screenshot_2022-07-20-05-09-38-916_io.homeassistant.companion.android.jpg
 
So this is a solar assistant question

I installed it , and its connected to inverter and battery

It's connected to WiFi and working well. Rather easy.

But the bloody thing won't get discovered by Home Assistant. They are both on the same LAN so to speak.

I am trying to follow their Mqtt guide but it seems outdated or my ha config is wierd. I am using the native MQTT broker on HA , but when I listen to topics never see this thing come up. They said it could take 10 minutes. I left it overnight and still nothing in HA

Weirdly, the 2 devices shown as configured on broker, are my paradox alarm and one sonoff SV, but it also doesn't list other sonoff devices I have even though the listener shows that it is receiving topic updates from them

I rebooted everything and still no dice.

I can't seem to figure out if i can add the solar assistant as a third device to the broker, there seems to be no way. And the solar assistant UI doesn't give the option for you to set the Mqtt broker IP, user/pass.

Hesitant to disable the broker on HA or reconfigure from scratch as I don't think I have the willpower to go through duplicate sensor names etc for my paradox alarm as that's what happened last time PAI had an issue .

As usual what have I missed ?Screenshot_2022-07-20-05-18-08-279_com.duckduckgo.mobile.android.jpgScreenshot_2022-07-20-05-20-29-029_io.homeassistant.companion.android.jpg
 
@TedLasso Just to confirm, you did bridge the two mqtt brokers?

https://solar-assistant.io/help/home-assistant/broker-setup
Just had a quick look at my setup, I had to add a additional folder (conf.d) before the solar_assistant.conf
View attachment 1350044
View attachment 1350046

So did I add the file yesterday too following that guide (but never saw the conf.d reference) ... mines as it is now - > Mines is running the official image in a VM so perhaps there could be a slight difference

192.168.2.2 (is my HA box)

1658298637047.png

The one difference is I never added the port after the IP (192.168.2.8 is the SolarAssistant Pi) like you did because the guide didn't mention it but now have done that and reboot the HA
1658298718548.png

Will see if that works. If not, I will then add the conf.d folder before it.

Thanks for the extra hints!


Edit: I just noticed something else. In the guide they say the file is supposed to be called solar_assistant.conf . You also refer to it as such, but your screenshot has it as solar-assistant.conf ...
 

Attachments

  • 1658298691494.png
    1658298691494.png
    17.5 KB · Views: 13
So did I add the file yesterday too following that guide (but never saw the conf.d reference) ... mines as it is now - > Mines is running the official image in a VM so perhaps there could be a slight difference

192.168.2.2 (is my HA box)

View attachment 1350066

The one difference is I never added the port after the IP (192.168.2.8 is the SolarAssistant Pi) like you did because the guide didn't mention it but now have done that and reboot the HA
View attachment 1350072

Will see if that works. If not, I will then add the conf.d folder before it.

Thanks for the extra hints!


Edit: I just noticed something else. In the guide they say the file is supposed to be called solar_assistant.conf . You also refer to it as such, but your screenshot has it as solar-assistant.conf ...

Just double check your mosquito broker in HA and remember to restart the broker. I dont think the file name makes a difference as long as it ends in ".conf"
1658301734732.png

You can also try http://mqtt-explorer.com/ its a pretty nice free program
1658301930493.png
 
Just double check your mosquito broker in HA and remember to restart the broker. I dont think the file name makes a difference as long as it ends in ".conf"
View attachment 1350104

You can also try http://mqtt-explorer.com/ its a pretty nice free program
View attachment 1350112

I had actually double checked with MQTTBroker (it's such a cool tool). On HA - no sub for Solar, but I could connect to the solarassistant MQTT broker to see that it was working. It has a topic for Homeassistant

So it seems my MQTT bridge on HA might be a bit borked (will need to check later)

My HA
1658303377230.png

My SolarAssistant
1658303421223.png

What I can't seem to find on the MQTT broker on HA is the customize button (where you see the folder name i.e. mosquitto/conf.d) <-- There seems to be no option to set that using this one
1658303734355.png
 
can't seem to find on the MQTT broker on HA is the customize button (where you see the folder name i.e. mosquitto/conf.d) <-- There seems to be no option to set that using this one
It should be the one in addons, not the one in devices. The one in devices only acts a connector to the mqtt server (the one in addons).


addons>mosquito broker>configuration
 
It should be the one in addons, not the one in devices. The one in devices only acts a connector to the mqtt server (the one in addons).


addons>mosquito broker>configuration

You, Sir are a Genius! Forgot about that section altogether :)

This is what mines was setup as
1658309520251.png

now set to 'true'

and MQTT Broker now has three devices and all the goodness from Solar Assistant

1658309556844.png

1658309596297.png

Thank you so much.
 
So I noticed what I think is an oddity in Solar Assistant stats and what it sends to HA:-

From Solar Assistant: (Yes, bad PV Generation day)

1658326171787.png
In Home Assistant:
1658326321357.png

Load Energy is sum total for the day: 17.3kWh - I think. It probably is the net across Grid/Battery/PV - I guess it subtracts from when battery is used?

But "Grid In" is showing as 15.5 in HA but on solar assistant it is showing as 13.1 ? Surely Grid-In was supposed to show 13.1 too?

I understand Solar assistant does not count the power used by inverter, and efficiencies in battery charge/discharge but do you see the same discprepancy? I am trying to get HA to show me actual power used from Eskom. I assume it has to be the value as shown on the Solar Assistant site itself i.e. "Grid Used"

Cheers
 
So I noticed what I think is an oddity in Solar Assistant stats and what it sends to HA:-

From Solar Assistant: (Yes, bad PV Generation day)

View attachment 1350414
In Home Assistant:
View attachment 1350418

Load Energy is sum total for the day: 17.3kWh - I think. It probably is the net across Grid/Battery/PV - I guess it subtracts from when battery is used?

But "Grid In" is showing as 15.5 in HA but on solar assistant it is showing as 13.1 ? Surely Grid-In was supposed to show 13.1 too?

I understand Solar assistant does not count the power used by inverter, and efficiencies in battery charge/discharge but do you see the same discprepancy? I am trying to get HA to show me actual power used from Eskom. I assume it has to be the value as shown on the Solar Assistant site itself i.e. "Grid Used"

Cheers
To me it looks like HA is showing more up to date values.

Load 17.3 - Grid 15.5 = 1.8 but then there is battery in out.
15.2 - 13.1 = 2.1
 
So I noticed what I think is an oddity in Solar Assistant stats and what it sends to HA:-

From Solar Assistant: (Yes, bad PV Generation day)

View attachment 1350414
In Home Assistant:
View attachment 1350418

Load Energy is sum total for the day: 17.3kWh - I think. It probably is the net across Grid/Battery/PV - I guess it subtracts from when battery is used?

But "Grid In" is showing as 15.5 in HA but on solar assistant it is showing as 13.1 ? Surely Grid-In was supposed to show 13.1 too?

I understand Solar assistant does not count the power used by inverter, and efficiencies in battery charge/discharge but do you see the same discprepancy? I am trying to get HA to show me actual power used from Eskom. I assume it has to be the value as shown on the Solar Assistant site itself i.e. "Grid Used"

Cheers
maybe its covered by this?

1658329217297.png
 
Is anyone using the Solcast forecast integration? I've managed to get the integration installed, but it doesn't pull in any data. :confused:

EDIT: found the issue. I was using the API url shown on solcast and not the key.
 
Is anyone using the Solcast forecast integration? I've managed to get the integration installed, but it doesn't pull in any data. :confused:

EDIT: found the issue. I was using the API url shown on solcast and not the key.

I was using two forecasting tools in HA (Forecast Solar and Solcast). Now I can finally compare their prediction vs actual , Solcast does appear to track better... I will probably dump forecast solar in a month's time.

1658394821763.png
 
Top
Sign up to the MyBroadband newsletter
X