Skip to content

Commit

Permalink
Merge pull request #147 from itchannel/1.29
Browse files Browse the repository at this point in the history
1.29
  • Loading branch information
itchannel authored Dec 20, 2021
2 parents 831bda1 + 7a6dd29 commit 0dd4599
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
7 changes: 4 additions & 3 deletions custom_components/fordpass/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,10 @@ async def _async_update_data(self):
self.vehicle.status # Fetch new status
)

data["guardstatus"] = await self._hass.async_add_executor_job(
self.vehicle.guardStatus # Fetch new status
)
# Temporarily removed due to Ford backend API changes
# 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
Expand Down
2 changes: 1 addition & 1 deletion custom_components/fordpass/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async def validate_input(hass: core.HomeAssistant, data):
if car["vin"] == data[VIN]:
vinfound = True
if vinfound == False:
raise InvalidVin
_LOGGER.debug("Vin not found in account, Is your VIN valid?")

if not result:
_LOGGER.error("Failed to authenticate with fordpass")
Expand Down
2 changes: 1 addition & 1 deletion custom_components/fordpass/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"config_flow": true,
"documentation": "https://github.com/itchannel/fordpass-ha",
"issue_tracker": "https://github.com/itchannel/fordpass-ha/issues",
"version": "0.1.28",
"version": "0.1.29",
"requirements": ["dotted==0.1.8"],
"ssdp": [],
"zeroconf": [],
Expand Down
11 changes: 10 additions & 1 deletion custom_components/fordpass/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,16 @@ def get_value(self, ftype):
)
elif self.sensor == "elVeh":
if self.coordinator.data["elVehDTE"] != None:
return self.coordinator.data["elVehDTE"]["value"]
if self.options[CONF_DISTANCE_UNIT] != None:
if self.options[CONF_DISTANCE_UNIT] == "mi":
return round(
float(self.coordinator.data[self.sensor]["value"])
/ 1.60934
)
else:
return self.coordinator.data[self.sensor]["value"]
else:
return self.coordinator.data[self.sensor]["value"]
else:
return "Unsupported"
elif self.sensor == "zoneLighting":
Expand Down
4 changes: 4 additions & 0 deletions info.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@

# **Changelog**
### Version 1.29
- Disabled guard mode
- Fixed elvDTE units
- set Vin check on install to warning only (Lincoln cars don't show in ford database)
### Version 1.28
- Added vin check on setup (Will check if given VIN is linked to the credentials)
### Version 1.27
Expand Down

0 comments on commit 0dd4599

Please sign in to comment.