Closed timh77 closed 2 years ago
Hi,
Can you add you definition of the template sensors ❓
Yes would be helpful to know more about the template sensors as they may not be triggering the battery to update. You can also get more information by getting the debug log from the battery_sim by adding:
logger:
default: critical
logs:
custom_components.battery_sim: debug
to your configuration.yaml and then restarting. If you leave it to run for a few minutes go to logs then and click "load full log" you should see entries from the battery saying it's been set up and then each time it receives an update. You could paste the output here then we can maybe say more.
Thanks
Pretty weird... All of a sudden it started to work fine during the weekend. The battery is being charged/discharged like it should.
As for the template sensors, I have two. The first is to get the total consumption by adding the two tarif sensors. The second for the total production. I checked both sensors during the week and they were updated correctly throughout the day.
total_electricity_consumption:
value_template: >
{{ states('sensor.energy_consumption_tarif_1') | float +
states('sensor.energy_consumption_tarif_2') | float }}
unit_of_measurement: 'kWh'
friendly_name: "Total Electricity Consumption"
total_electicity_production:
value_template: >
{{ states('sensor.energy_production_tarif_1') | float +
states('sensor.energy_production_tarif_2') | float }}
unit_of_measurement: 'kWh'
friendly_name: "Total Electricity Production"
That is very strange. Glad it's working now. Let us know if it stops working again.
I had a similar issue with nothing happening, even if I set "override charge" to True.
After bouncing HA one more time after setting up the custom battery (in my case) it now started working...
Just putting this out there if anyone runs into a similar issue.
Hi!
Tried to add the battery_sim component yesterday and today but eventhough I think I followed the manual correctly all values remain 0 and the status remains "discharging". Hope anyone has an idea.
The data source is a utility meter (DSMR integration) which has import and export sensors for two tariffs. I added a template sensor to calculate the total import and export. Result is two sensors which are updated thoughout the day.
The error log remains empty. Below the configuration which I copied from the core.config_entries file.