CJNE / ha-porscheconnect

Porsche Connect custom component for Home Assistant
MIT License
29 stars 12 forks source link

honk and flash services #55

Closed fredriklj closed 2 years ago

fredriklj commented 2 years ago

Finally took some time to look at adding services for honk and flash (and only flash). Since services are called from out of the blue and not in the context of a vehicle, and since we do not want to use the VIN to identify the vehicle, I've made an attempt to look up vehicle data from the device registry using device id and go from there.

One think that puzzles me is that the key to the coordinator (the entry_id) is really a set (containing a single element) in the registry. I'm not sure if that is a good way to get hold of the coordinator. Perhaps you have a better idea.

CJNE commented 2 years ago

Yes that's the correct way to get ahold of the coordinator as far as I know, great work!