mbillow / ha-chargepoint

Home Assistant ChargePoint EV Charger Integration
MIT License
44 stars 6 forks source link

Any plans to support starting / stopping charging in home assistant #12

Closed romlm closed 1 year ago

romlm commented 1 year ago

I am currently using this HACS integration and while it's great to let me know how much energy I've been using, it would be amazing to be able to start / stop the charge inside an automation.

Is this a feature that is being considered?

Thanks

mbillow commented 1 year ago

I implemented support for it in the ChargePoint Python library I wrote. It just needs to be wired up to a service in Home Assistant. I haven’t had the time to do it myself, but would definitely review any PRs in the mean time.

brooksbennett commented 1 year ago

Would love to see this as well! Currently using a virtual switch in Home Assistant that triggers a routine in the Alexa skill to start and stop charging if that is helpful to anyone in the meantime...

mbillow commented 1 year ago

I just released v0.6.0 which includes a new switch entity for home chargers that lets you start and stop charging. ⚡🔌

Try it out and let me know what you think! 😄

Screenshot 2023-02-25 at 5 27 02 PM
brooksbennett commented 1 year ago

Only issue I have is status takes a while to update. I presume this is because of a slower polling time to not overtax the api.

If charging starts and needs to be stopped quickly I get “you can’t stop a session that isn’t started”

Great to have this feature!

mbillow commented 1 year ago

I presume this is because of a slower polling time to not overtax the api.

Yah, I have the polling interval set at three minutes right now. Unfortunately, this is the nature of polling integrations. 😞

I'd love to just be able to keep a websocket or something like that open. Even if we cut the interval down, it still isn't going to be instant.