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

[FR] Re-implement the old departure timer service to update timers #627

Open
virtualdj opened this issue May 24, 2024 · 17 comments
Open

[FR] Re-implement the old departure timer service to update timers #627

virtualdj opened this issue May 24, 2024 · 17 comments
Labels
acknowledged Bug acknowledged by the developer enhancement New feature or request
Milestone

Comments

@virtualdj
Copy link

Is your feature request related to a problem? Please describe.

No, there are no real issues. But "resurrecting" the departure timer service, implemented in #352 with the old backend, could allow to stop charging at a specific value (using departureTimers > departureTimersStatus > Min SoC) without polling and also when the VW backend is down, especially at night. See below.

Describe the solution you'd like

Having the deprecated service with commit ab0a2fb back, with its parameters and ability to set a single or repeating timer (using attributes).

Describe alternatives you've considered

At the moment both the timer date and the Min SOC parameter can be set up in the VW app and then enabled/disabled using this integration. However the fact the app and backend handle 3 timers/profiles only doesn't allow many variations, which on the contrary would be possible by using the service and HA automations.

Additional context

When #547 has been opened, I was skeptical about the timer service to be really useful and I voted for a timer on/off being enough.

However, I later found out that there's an useful use case: if you want to stop the charge at night at a specific percentage, say 30%, both the integration and the VW backend must be running and polling the battery percentage to work successfully.
It happened to me two times that the battery value hasn't updated at night (due to the VW backend of course) and the automation wasn't able to stop the charge... and I actually charged 100% one time and 54% another (because the value updated with a delay).

The use case, when I would like to charge the battery until it reaches 30%, would be the following:

  1. set the Min SOC value to 30% (with the app it can be set to 0, 10, 20, 30, 40 or 50%)
  2. set a departure timer (for example the number 3) with charging set to True and the weekday to (current weekday + 2)

This triggers the charging immediately and then stops at 30%; an HA automation could then disable the timer to avoid charging the remaining percentage the day after... the wonderful thing is that stopping at the 30% doesn't require the VW backend and it really stops at that value exactly.

The (current weekday + 2) calculations can be done with templates, but setting the date/weekday and SOC requires having the old service back, so that we can set up specific attributes for the 3 timers.

I know this is a hard work, but think about it (with low priority). Maybe most of the work can be recovered from the old code; I see that the API is still there, for example domains/departureTimers/departureTimersStatus/minSOC_pct has the minimum charging percentage and domains/departureTimers/departureTimersStatus/timers/3 has several properties (enabled, climatisation, charging, singleTimer, recurringTimer, preferredChargingTimes) that seem to resemble to the old ones... 🤞

No hurry, no pressure. Just a milestone idea.

@virtualdj virtualdj added the enhancement New feature or request label May 24, 2024
@stickpin
Copy link
Collaborator

stickpin commented May 25, 2024

Hi @virtualdj,

Thanks for the detailed info, I will check what can i do...
Currently, I am in the middle of the implementation of the "set charging amperage". @ceppa did PR about two weeks ago, I am implementing it based on the existing mechanism and with the frontend select entity, something that I've never done before. I am a backend person, frontend is always a PITA for me. 😆

I think I will release v5.0.0 to the public and after that will start looking into the departure timer service as the v5.1.0 milestone.

Have a great weekend! 😊

@stickpin stickpin added the acknowledged Bug acknowledged by the developer label May 25, 2024
@stickpin stickpin added this to the v5.1.0 milestone May 25, 2024
Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Jun 25, 2024
@virtualdj
Copy link
Author

Hey bot, this is a feature request, not a stale issue 😉

@github-actions github-actions bot removed the stale label Jun 26, 2024
Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Jul 26, 2024
@virtualdj
Copy link
Author

I'm still interested, of course.

@github-actions github-actions bot removed the stale label Jul 27, 2024
Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Aug 26, 2024
@virtualdj
Copy link
Author

Still a feature request.

@github-actions github-actions bot removed the stale label Aug 27, 2024
Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Sep 26, 2024
@virtualdj
Copy link
Author

virtualdj commented Sep 26, 2024

Feature requests should be excluded from the automatic stale tagging of the bot.

@github-actions github-actions bot removed the stale label Sep 27, 2024
Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Oct 27, 2024
@virtualdj
Copy link
Author

Same than before.

@github-actions github-actions bot removed the stale label Oct 28, 2024
@virtualdj
Copy link
Author

Still valid.

@jellenijhof12
Copy link

Is it currently possible to update a timer with a script, or is there currently no possibility to update a timer from HA?

@virtualdj
Copy link
Author

virtualdj commented Dec 4, 2024

Is it currently possible to update a timer with a script, or is there currently no possibility to update a timer from HA?

At the moment it is NOT possible to change the departure timers (only enable or disable them). Please vote this feature request if you're interested too.

Copy link

github-actions bot commented Jan 4, 2025

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Jan 4, 2025
@virtualdj
Copy link
Author

Why the bot continuosly tries to add the stale label, if there is already the acknowledged label?

virtualdj added a commit to virtualdj/homeassistant-volkswagencarnet that referenced this issue Jan 4, 2025
At the moment the gitactions-bot tries to set the `stale` label even on issues/feature requests already marked as acknowledged or even on milestones (see robinostlund#627 for example).

This modification should tell the bot to avoid those types of issues.
virtualdj added a commit to virtualdj/homeassistant-volkswagencarnet that referenced this issue Jan 4, 2025
At the moment the gitactions-bot tries to set the `stale` label even on issues/feature requests already marked as acknowledged or even on milestones (see robinostlund#627 for example).

This modification should tell the bot to avoid those types of issues.
@github-actions github-actions bot removed the stale label Jan 5, 2025
@Gartom
Copy link

Gartom commented Jan 6, 2025

I would really much want this feature as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledged Bug acknowledged by the developer enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants