batpred
batpred copied to clipboard
Install button not working
Installed version v8.0.0 Latest version v8.1.0
From Home Assistant Settings, I am told that there is an updated version of Predbat available (along with a yellow 1). However, if I click on Install, nothing happens. I can, however, update from within HACS.
I can't see anything in the logs that relate to this.
Also, whenever I update, I have to restart AppDaemon - is there a way I can avoid this?
Installed version v8.0.0
Latest version v8.1.0
From Home Assistant Settings, I am told that there is an updated version of Predbat available (along with a yellow 1). However, if I click on Install, nothing happens. I can, however, update from within HACS.
I can't see anything in the logs that relate to this.
Also, whenever I update, I have to restart AppDaemon - is there a way I can avoid this?
You could try using the select.predbat_update control to select the version to upgrade to, or turning on auto-update switch in Predbat. Either of these will mean Predbat updates itself and doesn't need to restart AppDaemon.
If you update via HACS you will always get the 'template error' and have to restart AppDaemon, it's just the way it works, sorry.
So it looks like it does install but there’s some error even after a restart causing it to not update status.
So it looks like it does install but there’s some error even after a restart causing it to not update status.
Can you share what's in your logfile please.
What version were you upgrading from? If it was an old version did you upgrade to 7.22.5 first?
Upgrading from 8.0.0 to 8.1.0, manually switching back to 8.0.0 got rid of the error.
Will grab the logs.
`2024-06-22 14:12:44.555115 INFO pred_bat: Creating pool of 2 processes to match your CPU count 2024-06-22 14:12:44.583172 INFO pred_bat: Calculate Best options: mode(Control charge) calculate_discharge_oncharge(True) set_discharge_freeze_only(False) set_discharge_during_charge(True) combine_charge_slots(False) combine_discharge_slots(False) combine_rate_threshold(0.0) best_soc_min(0.0 kWh) best_soc_max(0.0 kWh) best_soc_keep(0.5 kWh) inverter_loss(4 %) battery_loss(3 %) battery_loss_discharge (3 %) inverter_hybrid(True) metric_min_improvement(0.0 p) metric_min_improvement_discharge(0.1 p) metric_battery_cycle(1.0 p/kWh) metric_battery_value_scaling(1.0 x) 2024-06-22 14:12:44.584341 INFO pred_bat: Error: Exception raised unsupported operand type(s) for +=: 'float' and 'NoneType' 2024-06-22 14:12:44.586395 INFO pred_bat: Error: Traceback (most recent call last): File "/config/apps/predbat.py", line 10972, in update_time_loop self.update_pred(scheduled=False) File "/config/apps/predbat.py", line 9861, in update_pred recompute = self.calculate_plan(recompute=recompute) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/apps/predbat.py", line 8128, in calculate_plan self.optimise_all_windows(metric, metric_keep) File "/config/apps/predbat.py", line 6769, in optimise_all_windows window_sorted, window_index, price_set, price_links = self.sort_window_by_price_combined( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/apps/predbat.py", line 6356, in sort_window_by_price_combined average += self.metric_self_sufficiency TypeError: unsupported operand type(s) for +=: 'float' and 'NoneType'
2024-06-22 14:12:44.605946 INFO pred_bat: Info: record_status Error: Exception raised unsupported operand type(s) for +=: 'float' and 'NoneType'`
Potential fix on main for testing.
Switched to main from 8.0.0 and got the same error, logfile looked the same too.
Can you share the logfile?
Went 8.0 -> 8.1.1, got error. Restarted appdaemon (docker container), Error persisted. Went 8.1.1 -> main, error cleared.
Went 8.0 -> 8.1.1, got error. Restarted appdaemon (docker container), Error persisted. Went 8.1.1 -> main, error cleared.
Apologies, have been out.
That actually worked, I went 8.0.0 -> 8.1.0, error, restarted appdaemon, after the restart completed the error went, went up to 8.1.1 and all is good now.