Hello, I would like to receive a notification when my solar panels have produced 1000kw.
The Addon SBFspot has created MQTT integration where I can see an entity which shows me the total lifetime power my solar inverter has produced and with this sensor I would like to create the automation counter when there is + 1000kw produced it sends a notification to me.
I would appreciate somebody can point me into the right direction.
You are confusing energy and power. These are different things. Power is the instantaneous value, measured in kW. Energy is the total value supplied, measured in kWh.
It sounds like you want to be notified each time your PV array has produced 1000kWh from the current total value. So…
Create a utility meter helper with no reset cycle:
# configuration.yaml
utility_meter:
solar_energy_counter:
name: Solar Energy Counter
unique_id: solar_energy_counter_utility_meter
source: sensor.your_energy_sensor_here
I think you can do this in the UI but I am not sure if the UI Helpers version supports not supplying a reset cycle. You may have to do that in YAML.
This sensor will count up the total energy produced since it was created. You can trigger an automation when this reaches 1000kWh. Then reset the sensor value to 0 in the actions so it starts counting up to 1000 again, and send your notification.
You can create the automation in the UI Automation Editor or in YAML.
triggers:
- trigger: numeric_state
entity_id: sensor.solar_energy_counter
above: 999.999
actions:
- action: utility_meter.calibrate # reset action only available for meters with tariffs. So calibrate to 0 instead.
target:
entity_id: sensor.solar_energy_counter
data:
value: 0
- action: notify.your_notification_service_here
data:
message: "🌞The solar array has produced 1000kWh since the last time this message was sent."
Hello Tom, I’m so gratefull you have given me this information, so I have to put that into the general configuration.yaml from HA? I could also create a seperate helpers.yaml and tell in the configuration.yaml to include helpers.yaml ?
Thank you, Ryan