-
-
Notifications
You must be signed in to change notification settings - Fork 65
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] Ability to set departure times from HA #352
Comments
Yes please <3 |
The underlying library does not (yet?) support this.. |
But I started looking into if it would be easy enough to implement |
Just realized that if we want to be able to edit multiple attributes for a timer (or many timers), HA would by default send one update to the car / changed attribute.. I have "something" working now (read-only though still), but need to figure out the update procedure.. Don't want to waste 10 requests for changing 2 schedules |
Small teaser:
|
okay. managed to actually get it working. departure timers 1..3 can be turned on and off from HA. The only problem seems to be that the new devices are not automatically detected, and I had to remove and re-add the integration for them to show up.. @robinostlund halp!? Is there some magic trick to reconfigure the selected sensors etc for this integration without having to set it up from scratch? |
Damn, nice work @milkboy :) |
Fantastic! How can i test it? |
well.. uhm... until there is an official (alpha/beta) release, you'd need to get the sources from 'timerprogramming" branches in both the lib and HA repositories and install the needed files in the correct places 😒
You might want to make sure to have proper backups before trying that though 😉 Anyway, I'm about 80% sure that something will explode for PHEVs, as I suspect they have slightly differing data in the messages, but... 🤷 |
Haven't tried in HA yet, but this is my json using the lib It looks very similar to https://github.com/robinostlund/volkswagencarnet/blob/timerprogramming/tests/fixtures/resources/responses/timer.json |
hmm. yea. might need to fix those unnamed profiles :D Apparently they always exist in the response from the backend. |
okay. pushed a new version that should not accidentally "create" the unused profiles when any change is saved again |
Oh, and only made it possible to edit one schedule / request for now. Not sure if there is a need to update many at the same time, and/or edit the profiles also. Maybe it's fine to just switch profile for a timer for now? I've not edited those at all since I switched to using a Node RED flow for deciding which hours to charge on (which is super nice with hourly spot prices on electricity). In theory, the flow could maybe use 1-3 departure schedules as needed, and update the contiguous off-peak (aka cheap) hours to the location for each schedule, and thus "waste" only a single request to the car, but it's maybe overdoing it slightly 😆 |
used these in dev env to visualize the attributes
and
might need a custom card or something though, as the content depends on the frequency.. oh, and the services are easily callable from the developer ui, both using yaml and UI http://localhost:8123/developer-tools/service |
Should be possible to make it slightly smarter by importing the profiles also as entities, instead of just using the numeric id, but 🤷 |
Yes exactly! I love it 👍 My car has 5, 10, 13 and Max in charge values This also solves this issue: robinostlund/volkswagencarnet#13 |
Arf. The charge currents are a bit tricky 🤔 Anyway, there is a "global" max current setting, and then there is a setting / charging profile. Never checked how the logic works of there are multiple charging profiles active.. Is it the "next" departure time that selects which profile to use? Anyway, if no departure timer is active, I guess the "global" value is used.. But what if the global one is say 10, and you try to use 16 in a profile? So many questions 😆 |
I think that the global setting is used when charging is started manually and the profile is used when it's started by a timer |
That would make sense 🙈 |
Regarding robinostlund/volkswagencarnet#13, I added a service for setting that value also 🥳 There might be some rough edges though, as I've not tested either that or the profile changing with my car 😉 |
I got it working on a dev environment, but I can't figure out how to install the lib in my main HA. Do you think it would be possible to release a beta soon? |
There is a beta version available now (well, 4th try on getting it more or less correct). Normal "works for me, but might blow up your installation, so please make backups"-clause applies. Also, it's very likely that there are some cars it won't (yet) work with, and also note that not all options are available for all cars. If the app is not showing a setting, then it's probably not possible to set the value for it (BEVs don't have the option to use auxiliary heater etc). |
Is your feature request related to a problem? Please describe.
Currently, it is not possible to see or enabled/disable Departure times in Home Assistant.
Describe the solution you'd like
I want to enable or disable Departure Time 1/2/3 and possibly change the date/time for next departure, according to Home Assistant sensors
Describe alternatives you've considered
Alternatives is keep using the VW app, or trigger charging and air conditioning at a specific time before, but that will not show on the car UI
Additional context
The text was updated successfully, but these errors were encountered: