molobrakos / volvooncall

Retrieve information from the Volvo On Call (VOC) web service
The Unlicense
154 stars 49 forks source link

Error when switching on Heater, possibly due to region restriction #98

Open jampez77 opened 11 months ago

jampez77 commented 11 months ago

I'm in the UK and have a 2019 S90.

I use Home Assistant to access my VoC info, which of course uses this library.

The car dashboard has parking climate enabled however it doesn't work. Having spoken to Volvo last week after the car went in for it's annual service they told me that the feature is actually restricted to US and Scandinavian regions. There is a bug with the cars software that means feature is active but produces an error when used.

I can see in the code that heater is used in favour of preclimatization . The problem for me and car like mine is that is_remote_heater_supported incorrectly reports true. So i was wondering if there is a way to add a region condition to is_remote_heater_supported or expose preclimatization as well as heater

    async def start_heater(self):
        """Turn on/off heater."""
        if self.is_remote_heater_supported:
            await self.call("heater/start")
            await self.update()
        elif self.is_preclimatization_supported:
            await self.call("preclimatization/start")
            await self.update()
        else:
            _LOGGER.warning("No heater or preclimatization support.")