Skip to content
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

Predbat mode #420

Merged
merged 11 commits into from
Dec 4, 2023
Merged

Predbat mode #420

merged 11 commits into from
Dec 4, 2023

Conversation

springfall2008
Copy link
Owner

No description provided.

@springfall2008 springfall2008 merged commit 97eef73 into main Dec 4, 2023
1 check failed
@springfall2008 springfall2008 deleted the predbat-mode branch December 4, 2023 19:59
Copy link
Collaborator

@iainfogg iainfogg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is merged, but thought I'd drop a comment in now I've been able to look it over.

And I think this is a good step forward in further simplifying things, well done!

self.calculate_best_charge = True
self.calculate_best_discharge = True
self.set_charge_window = True
else: # PREDBAT_MODE_OPTIONS[PREDBAT_MODE_MONITOR]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I'd make this an explicit elif, followed by an else that throws an error due to an unexpected mode, so it's safer in the future if you add other values to the mode.

Or is this else primarily the mechanism to set the mode to MONITOR if no mode is currently set?

@iainfogg
Copy link
Collaborator

iainfogg commented Dec 4, 2023

Also, the mode dropdown doesn't appear in the auto entities card, it'd be good to coordinate with the person who build that to add another section for it (or maybe add it manually at the top of that card alongside the status).

@iainfogg
Copy link
Collaborator

iainfogg commented Dec 4, 2023

Now I've got it running and checked it out more, I also thought that the docs for the SOC only section don't make it clear (to me at least) what the benefit is of this mode, I couldn't figure why I'd want it to adjust the target percentage - but I expect there is a reason that you understand :)

https://springfall2008.github.io/batpred/customisation/#predbat-control-soc-only-mode

@iainfogg
Copy link
Collaborator

iainfogg commented Dec 4, 2023

And I think I would have had the mode options in a different order, with Monitor, Charge and Discharge, Charge, SOC - the first one for the default starting value, then the others in what I guess is reducing order of likeliness of selection. Not a big deal, just may be a tad more usable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants