Skip to content

Commit

Permalink
remove mod + 2022.7 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
itchannel committed Jul 1, 2022
1 parent 681b085 commit dbc2b40
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 10 deletions.
3 changes: 1 addition & 2 deletions custom_components/fordpass/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand Down
2 changes: 2 additions & 0 deletions custom_components/fordpass/device_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions custom_components/fordpass/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {},
Expand Down
2 changes: 2 additions & 0 deletions custom_components/fordpass/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
2 changes: 2 additions & 0 deletions custom_components/fordpass/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
15 changes: 9 additions & 6 deletions info.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit dbc2b40

Please sign in to comment.