Skip to content

Commit

Permalink
Merge pull request #140 from itchannel/1.26
Browse files Browse the repository at this point in the history
1.26
  • Loading branch information
itchannel authored Dec 12, 2021
2 parents 771d6c9 + b6e0794 commit 0f15c35
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions custom_components/fordpass/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ async def _async_update_data(self):
data["guardstatus"] = await self._hass.async_add_executor_job(
self.vehicle.guardStatus # Fetch new status
)

data["messages"] = await self._hass.async_add_executor_job(
self.vehicle.messages
)

# If data has now been fetched but was previously unavailable, log and reset
if not self._available:
Expand Down
4 changes: 3 additions & 1 deletion custom_components/fordpass/fordpass_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,11 @@ def status(self):
return result["vehiclestatus"]
else:
r.raise_for_status()

def messages(self):
self.__acquireToken()

def messages(self):
self.__acquireToken()
headers = {
**apiHeaders,
"Auth-Token": self.token,
Expand All @@ -244,6 +245,7 @@ def messages(self):
_LOGGER.debug(r.text)
r.raise_for_status()


def guardStatus(self):
# WIP current being tested
self.__acquireToken()
Expand Down

0 comments on commit 0f15c35

Please sign in to comment.