Skip to content

Commit

Permalink
Readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
itchannel committed Dec 4, 2020
2 parents f722780 + 555a420 commit 0ff027d
Showing 1 changed file with 33 additions and 5 deletions.
38 changes: 33 additions & 5 deletions custom_components/fordpass/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def get_value(self, ftype):
for key, value in self.coordinator.data[self.sensor].items():
if value["value"] == "Invalid":
continue
if (value["value"] != "Closed"):
if value["value"] != "Closed":
return "Open"
return "Closed"
elif self.sensor == "windowPosition":
Expand Down Expand Up @@ -116,10 +116,38 @@ def get_value(self, ftype):
elif self.sensor == "tirePressure":
if self.coordinator.data["TPMS"] != None:
return {
"leftFrontTirePressure": round(float(self.coordinator.data["TPMS"]["leftFrontTirePressure"]["value"]) * 0.1450377377),
"rightFrontTirePressure": round(float(self.coordinator.data["TPMS"]["rightFrontTirePressure"]["value"]) * 0.1450377377),
"outerLeftRearTirePressure": round(float(self.coordinator.data["TPMS"]["outerLeftRearTirePressure"]["value"]) * 0.1450377377),
"outerRightRearTirePressure": round(float(self.coordinator.data["TPMS"]["outerRightRearTirePressure"]["value"]) * 0.1450377377)
"leftFrontTirePressure": round(
float(
self.coordinator.data["TPMS"]["leftFrontTirePressure"][
"value"
]
)
* 0.1450377377
),
"rightFrontTirePressure": round(
float(
self.coordinator.data["TPMS"]["rightFrontTirePressure"][
"value"
]
)
* 0.1450377377
),
"outerLeftRearTirePressure": round(
float(
self.coordinator.data["TPMS"][
"outerLeftRearTirePressure"
]["value"]
)
* 0.1450377377
),
"outerRightRearTirePressure": round(
float(
self.coordinator.data["TPMS"][
"outerRightRearTirePressure"
]["value"]
)
* 0.1450377377
),
}
return None
elif self.sensor == "gps":
Expand Down

0 comments on commit 0ff027d

Please sign in to comment.