diff --git a/custom_components/fordpass/__init__.py b/custom_components/fordpass/__init__.py index 579e10b..9187df7 100644 --- a/custom_components/fordpass/__init__.py +++ b/custom_components/fordpass/__init__.py @@ -5,7 +5,6 @@ import async_timeout import voluptuous as vol -from dotted.collection import DottedDict from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from homeassistant.core import HomeAssistant @@ -182,7 +181,7 @@ async def _async_update_data(self): _LOGGER.info("Restored connection to FordPass for %s", self.vin) self._available = True - return DottedDict(data) + return data except Exception as ex: self._available = False # Mark as unavailable _LOGGER.warning(str(ex)) diff --git a/custom_components/fordpass/device_tracker.py b/custom_components/fordpass/device_tracker.py index a31d14c..8856106 100644 --- a/custom_components/fordpass/device_tracker.py +++ b/custom_components/fordpass/device_tracker.py @@ -28,6 +28,8 @@ def __init__(self, coordinator, sensor): self.sensor = sensor self.coordinator = coordinator self._device_id = "fordpass_tracker" + # Required for HA 2022.7 + self.coordinator_context = object() @property def latitude(self): diff --git a/custom_components/fordpass/manifest.json b/custom_components/fordpass/manifest.json index fc9831f..cb035e1 100644 --- a/custom_components/fordpass/manifest.json +++ b/custom_components/fordpass/manifest.json @@ -4,8 +4,8 @@ "config_flow": true, "documentation": "https://github.com/itchannel/fordpass-ha", "issue_tracker": "https://github.com/itchannel/fordpass-ha/issues", - "version": "0.1.34", - "requirements": ["dotted==0.1.8"], + "version": "0.1.35", + "requirements": [], "ssdp": [], "zeroconf": [], "homekit": {}, diff --git a/custom_components/fordpass/sensor.py b/custom_components/fordpass/sensor.py index 192b41b..10bffd7 100644 --- a/custom_components/fordpass/sensor.py +++ b/custom_components/fordpass/sensor.py @@ -39,6 +39,8 @@ def __init__(self, coordinator, sensor, options): self._attr = {} self.coordinator = coordinator self._device_id = "fordpass_" + sensor + # Required for HA 2022.7 + self.coordinator_context = object() def get_value(self, ftype): if ftype == "state": diff --git a/custom_components/fordpass/switch.py b/custom_components/fordpass/switch.py index 626238e..e620cf2 100644 --- a/custom_components/fordpass/switch.py +++ b/custom_components/fordpass/switch.py @@ -35,6 +35,8 @@ def __init__(self, coordinator, switch, options): self._device_id = "fordpass_" + switch self.switch = switch self.coordinator = coordinator + # Required for HA 2022.7 + self.coordinator_context = object() async def async_turn_on(self, **kwargs): if self.switch == "ignition": diff --git a/info.md b/info.md index 9a73494..bf23690 100644 --- a/info.md +++ b/info.md @@ -1,15 +1,18 @@ -# **Changelog** -## Version 1.34 +## **Changelog** +### Version 1.35 +- Remove deprecated dotted module +- Add coordinator context for HA 2022.7 +### Version 1.34 - Change oauth flow for latest Fordpass changes -## Version 1.33 +### Version 1.33 - Fix occasional hacs error due to git tag issue -## Version 1.32 +### Version 1.32 - Fix auth flow to comply with new endpoints **Warning - If you encounter auth errors please delete the token file located in the install directory or use the "delete_token" service** -## Version 1.31 +### Version 1.31 - Fix for multiple accounts -## Version 1.30 +### Version 1.30 - Fix for elvDTE error ### Version 1.29 - Disabled guard mode