batpred icon indicating copy to clipboard operation
batpred copied to clipboard

Generate sensors/helpers

Open unsmian opened this issue 8 months ago • 4 comments

Sensors/helpers not being generated by Predbat add on

Expected behaviour I am missing sensor.predbat_hu_0_charge_target_soc and sensor.predbat_hu_0_discharge_target_soc

Predbat version V8.18.0

unsmian avatar Apr 05 '25 20:04 unsmian

Can you please share where you got this from, the user would never type in this name if its generated and I think the name is 'sensor.predbat_xxxx_0_charge_limit'

springfall2008 avatar Apr 12 '25 14:04 springfall2008

I managed to change my approach and I’m now instead using automations for the purpose of forcibly charge/discharge. However, I was under the impression that Predbat would be able to generate entities like sensor.predbat_hu_0_charge_target_soc etc.

unsmian avatar Apr 12 '25 17:04 unsmian

predbat doesn't generally doesn't create sensors named as you have suggested, it sets the value of sensors such as target soc, but you need to define those sensor names in apps.yaml

can you share your apps.yaml configuration?

The template huawei apps.yaml doesn't have target_soc configured at all, it just has

charge_start_service: huawei_solar/forcible_charge_soc charge_stop_service: huawei_solar/stop_forcible_charge discharge_start_service: huawei_solar/forcible_discharge_soc discharge_stop_service: huawei_solar/stop_forcible_charge

So when you call the huawei forcible_charge_soc and forcible_discharge_soc services, how do those services know what value to charge/discharge to, or do they just charge to full/discharge to empty?

gcoan avatar Apr 12 '25 18:04 gcoan

If has_target_soc is false Predbat should create sensor.predbat_hu_0_charge_limit' - do you not see it?

springfall2008 avatar Apr 12 '25 19:04 springfall2008