-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code error for "predbat_status" sensor #1559
Comments
It looks like just a mistake in the logged message, not a code fault. The battery charge curve is found OK:
It's the discharge curve that then fails to be found. The sensors are all correctly listed in the log:
But then the logged message is that the charge curve cannot be found, it should say discharge curve cannot be found, and the predbat status sensor name is wrong:
I'll fix these issues with the logging. The reason for not finding the discharge curve is almost certainly that your battery has not been fully discharged in the last 15 days so predbat can't find and calculate the discharge curve from historical data |
OK that's great - Thanks for that. |
No problem, I have just fixed the code, all of the different logging messages from the curve calculations said "charge curve" regardless of whether it was a charge or discharge curve being calculated ! Also corrected predbat_status. The fix will be in the next PR I issue, thanks for raising it |
If you want to try the fixed code, copy inverter.py from my fork https://github.com/gcoan/batpred/tree/main/apps/predbat over the top of the existing inverter.py and restart Predbat, it should produce the right messages now |
Oh dear....to many "curves" lol. |
I think the problem is that my code fork is of Predbat 8.4.11 and you're running 8.5.1. Almost certainly there's something been changed by Trefor between the two versions that means running just inverter.py from 8.4.11 alongside the rest of Predbat 8.5.1 doesn't work. I know there has been rewriting and more unit testing added to the freeze discharge logic so this might be it. If you want to try copying the entire of my code fork across and restart the add-on, then it should work OK although you'll be downgraded to 8.4.11. Once I PR this in to the core codebase it should be OK as most of my changes are to the documentation, only a couple of minor code changes (of which this is one) |
Ok yep i understand then. That makes sense. |
Yeah you don't want to change the fork in the settings, bad things might happen! You could manually copy each of the six python files across, and in fact it might just be predbat.py you need, but as you say, we've proven the messages are now correct in my fix and we know that it's just a log message issue. I'll PR it before the end of the week, just want to finish some other documentation changes off first |
* added inverter_limit_charge/discharge to GivTCP template, tweak descriptions * typo in github bug_report template * Suppress discharge limit (99) from status when Freeze Discharging * Predbat error monitor changes when upgrading from Appdaemon to Predbat addon * Correct currency_symbols indentation in apps.yaml * Add Predbat Web Console link to predbat dashboard * inverter_limit - add multi-AIO note * multi-AIO set charge/discharge limits * Output data: add missing Predbat PV forecasts * Review & expand best entity list in output data * Completed review & expanding 'best' entity descriptions * Remove duplicated and redundant predbat.soc_min_kwh entity * Review & expand baseline entity list in output data * Prediction window and in-day load adjustment sensors * update automation scripts to HA 2024.10 notation * Typo high rate entity names * Update templates for new Octopus Intelligent sensor names in Octopus Integration v13 * Explain load scaling more clearly in apps.yaml * Advice about setting losses correctly * #1548 Check 'car ready to charge' sensor value is configured in apps.yaml * #1559 Add correct curve type to curve calculation messages * Update nordpool energy rates URL for Predbat 8.5.1 * highlight that manual car SoC must be in kWh not SoC % * Corrected YAML indentation for rates override * Documented h0 sensors * energy rate overrides * Energy saving data sensors, remove references to appdaemon-predbat install method * Carbon and export trigger sensors * Revert predbat.soc_min_kwh and correct friendly name * [pre-commit.ci lite] apply automatic fixes * Correct octopus sensor id's in apps.yaml templates * Inverter setup capitalisation * Simplify and resolve naming issues in sample EV setup --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Describe the bug
In the Predbat log. In order to calculate the discharge curve. It is looking for the entity "predbat_status"
However, the entity name that exists is "predbat.status"
Predbat version
v8.5.1
Environment details
Screenshots
Log file looking for "predbat_status"
Entity name as it exists in HA:
Log file
PredBat Log.txt
The text was updated successfully, but these errors were encountered: