-
Notifications
You must be signed in to change notification settings - Fork 117
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
Changes in manual override #656
base: master
Are you sure you want to change the base?
Conversation
Hum... Does this make sense? The primary use case is pressing the physical button on the EVSE. The existing behaviour is to just override to the opposite of what the current state is. Where as this will force it to the default state. But what if the EVSE is in that state? The button will do nothing right? Not sure that is desirable. If you wanted to bring some synergy with the UI you could toggle active/disabled/auto maybe? |
@jeremypoulter , I've only reverted the claim/release toggle behavior depending of the default state configured. |
@KipK yeah the toggle looked at what the current state of the EVSE is and then switched to the opposite, as in if it was currently charging it would disable, if it is currently disabled, it would change to active. The default state is irrelevant to that. |
@jeremypoulter, not sure it was, look, the isActive() was just checking if there's a claim from EvseClient_OpenEVSE_Manual, considering before override was only used for the state property so it fits. I've replaced by
Should do the same, without saying override is active when there's only a charge_current property but no state. and then in ManualOverride::toggle(), it just now reverse the claim(), clear() needed depending of default_state as it can be set to disabled so this needs to be reversed in this case. It also prevent the LCD to display manual override when it is supposed to not be the case |
Correct, isActive checks to see if the override is active or not, if active it clears it if not it makes a claim. It is the latter that then checks is the EVSE is active or not and does the opposite: bool ManualOverride::claim()
{
EvseProperties props(EvseState::Active == _evse->getState() ? EvseState::Disabled : EvseState::Active);
return claim(props);
} |
@jeremypoulter ok, so if we want to mimic the UI, does something like this would work ? manual.toggle() should do: if current state is disabled: if current state is active: UI would call manual.toggle() for Activate/Disable buttons ( needs an endpoint for that ) for the button to mimic the same UX:
|
I think that is correct, however I wouldn't worry about the charge current, should just set to max. Also there is some more extensive work to do around the button so leave any long press handling till later |
This is needed to keep the charge_current that was set previously ( i.e. from the slider in the main interface or from hass over mqtt/api ) |
c9afb95
to
e73f8a6
Compare
e282d50
to
46260b0
Compare
b8bc974
to
e840e34
Compare
edit:
some changes in manual override to match ui & button
remove "manual_override" status event