Comments (7)
So I believe this is the offending line
self.coordinator.data["TPMS"]["leftFrontTirePressure"][
"value"
]
)
Does your car not support TPMS?
Would you mind running the debug script and sending me the Json output from the vehicle array Debug Script
from fordpass-ha.
My car does support TPMS.
Here is the JSON as requested:
{'vin': 'ABC123', 'lockStatus': {'value': 'LOCKED', 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'alarm': {'value': 'ACTIVE', 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'PrmtAlarmEvent': {'value': 'Null', 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'odometer': {'value': 72861.0, 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'fuel': {'fuelLevel': 36.521856, 'distanceToEmpty': 272.5, 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'gps': {'latitude': '69', 'longitude': '-69', 'gpsState': 'UNSHIFTED', 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'remoteStart': {'remoteStartDuration': 0, 'remoteStartTime': 0, 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'remoteStartStatus': {'value': 0, 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'battery': {'batteryHealth': {'value': 'STATUS_GOOD', 'timestamp': '12-12-2020 18:12:32'}, 'batteryStatusActual': {'value': 12, 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}}, 'oil': {'oilLife': 'STATUS_GOOD', 'oilLifeActual': 75, 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'tirePressure': {'value': 'STATUS_GOOD', 'timestamp': '04-07-2018 18:37:36'}, 'authorization': 'AUTHORIZED', 'TPMS': {'tirePressureByLocation': {'value': 0, 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'tirePressureSystemStatus': {'value': 'Systm_Activ_Composite_Stat', 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'dualRearWheel': {'value': None, 'status': 'LAST_KNOWN', 'timestamp': '08-12-2017 21:25:26'}, 'leftFrontTireStatus': {'value': '', 'status': 'LAST_KNOWN', 'timestamp': '08-12-2017 21:25:26'}, 'leftFrontTirePressure': {'value': '', 'status': 'LAST_KNOWN', 'timestamp': '08-12-2017 21:25:26'}, 'rightFrontTireStatus': {'value': '', 'status': 'LAST_KNOWN', 'timestamp': '08-12-2017 21:25:26'}, 'rightFrontTirePressure': {'value': '', 'status': 'LAST_KNOWN', 'timestamp': '08-12-2017 21:25:26'}, 'outerLeftRearTireStatus': {'value': '', 'status': 'LAST_KNOWN', 'timestamp': '08-12-2017 21:25:26'}, 'outerLeftRearTirePressure': {'value': '', 'status': 'LAST_KNOWN', 'timestamp': '08-12-2017 21:25:26'}, 'outerRightRearTireStatus': {'value': '', 'status': 'LAST_KNOWN', 'timestamp': '08-12-2017 21:25:26'}, 'outerRightRearTirePressure': {'value': '', 'status': 'LAST_KNOWN', 'timestamp': '08-12-2017 21:25:26'}, 'innerLeftRearTireStatus': {'value': '', 'status': 'LAST_KNOWN', 'timestamp': '08-12-2017 21:25:26'}, 'innerLeftRearTirePressure': {'value': '', 'status': 'LAST_KNOWN', 'timestamp': '08-12-2017 21:25:26'}, 'innerRightRearTireStatus': {'value': '', 'status': 'LAST_KNOWN', 'timestamp': '08-12-2017 21:25:26'}, 'innerRightRearTirePressure': {'value': '', 'status': 'LAST_KNOWN', 'timestamp': '08-12-2017 21:25:26'}, 'recommendedFrontTirePressure': {'value': None, 'status': 'LAST_KNOWN', 'timestamp': '08-12-2017 21:25:26'}, 'recommendedRearTirePressure': {'value': None, 'status': 'LAST_KNOWN', 'timestamp': '08-12-2017 21:25:26'}}, 'firmwareUpgInProgress': {'value': False, 'timestamp': '08-09-2020 23:27:24'}, 'deepSleepInProgress': {'value': False, 'timestamp': '07-16-2018 13:08:14'}, 'ccsSettings': {'timestamp': '04-21-2017 17:27:00', 'location': -1, 'vehicleConnectivity': -1, 'vehicleData': -1, 'drivingCharacteristics': -1, 'contacts': -1}, 'lastRefresh': '12-12-2020 18:12:32', 'lastModifiedDate': '12-12-2020 18:12:34', 'serverTime': '12-15-2020 17:57:35', 'batteryFillLevel': {'value': 50.0, 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'elVehDTE': None, 'hybridModeStatus': {'value': 'NullState', 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'chargingStatus': {'value': 'NotReadyNullState', 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'plugStatus': {'value': 0, 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'chargeStartTime': {'value': '01-01-2010 00:00:00', 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'chargeEndTime': {'value': '01-01-2010 00:00:00', 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'preCondStatusDsply': None, 'chargerPowertype': None, 'batteryPerfStatus': None, 'outandAbout': {'value': 'PwPckOffTqNotAvailable', 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'batteryChargeStatus': None, 'dcFastChargeData': None, 'windowPosition': {'driverWindowPosition': {'value': 'Fully_closed_position', 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'passWindowPosition': {'value': 'Fully_closed_position', 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'rearDriverWindowPos': {'value': 'Undefined_window_position', 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'rearPassWindowPos': {'value': 'Undefined_window_position', 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}}, 'doorStatus': {'rightRearDoor': {'value': 'Closed', 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'leftRearDoor': {'value': 'Closed', 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'driverDoor': {'value': 'Closed', 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'passengerDoor': {'value': 'Closed', 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'hoodDoor': {'value': 'Closed', 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'tailgateDoor': {'value': 'Closed', 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'innerTailgateDoor': {'value': 'Closed', 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}}, 'ignitionStatus': {'value': 'Off', 'status': 'CURRENT', 'timestamp': '12-12-2020 18:12:34'}, 'batteryTracLowChargeThreshold': None, 'battTracLoSocDDsply': None, 'dieselSystemStatus': None}
from fordpass-ha.
I updated my VIN, Lat, & Long to protect the innocent...
As far as TPMS - it looks like the answer is "sort of", but the JSON explains why it always thinks my windows are open as well.
from fordpass-ha.
Ok it looks like your car doesn't actually give the tyre pressures which is why it's erroring. I will have to add a check to ignore tyre pressures with the none object the rest will return 0. Although I do wonder if down the line your car might actually give tyre pressures as it responds with "0" for some rather than None.
I can fix the windows issue, I've come across a number of different window statuses depending on the car model. Your car appears to respond with "Undefined_window_position" which I can now add as a check and discard that value.
from fordpass-ha.
Should be fixed in the latest update #60
from fordpass-ha.
Error is gone. Thank you.
Window still shows as open, but let's see what others get in their status as I'm sure when more people find the integration, you get a bigger picture and I may be an anomaly.
from fordpass-ha.
Should be fixed in the latest update #60
Looks like this is back...
2021-12-16 08:45:52 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform fordpass Traceback (most recent call last): File "/opt/homeassistant/3.9.7/lib/python3.9/site-packages/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities await asyncio.gather(*tasks) File "/opt/homeassistant/3.9.7/lib/python3.9/site-packages/homeassistant/helpers/entity_platform.py", line 613, in _async_add_entity await entity.add_to_platform_finish() File "/opt/homeassistant/3.9.7/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 748, in add_to_platform_finish self.async_write_ha_state() File "/opt/homeassistant/3.9.7/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 505, in async_write_ha_state self._async_write_ha_state() File "/opt/homeassistant/3.9.7/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 541, in _async_write_ha_state extra_state_attributes = self.extra_state_attributes File "/opt/homeassistant/config/custom_components/fordpass/sensor.py", line 375, in extra_state_attributes return self.get_value("attribute") File "/opt/homeassistant/config/custom_components/fordpass/sensor.py", line 200, in get_value tirepress[key] = round(float(value["value"]) * sval) ValueError: could not convert string to float: ''
from fordpass-ha.
Related Issues (20)
- Ford Power-Up Status HOT 1
- Thoughts on developing 'smart' refresh function, best practices/suggestions? HOT 2
- DTE is not even showing up in fuel attributes HOT 2
- Add 3 raw Json sensors. HOT 1
- Add possibility to change credentials
- Feature Request "vehicleImage" HOT 5
- Source_type GPS deprecated HOT 1
- 'sensor.fordpass_fuel' cannot be added a second time HOT 2
- No vehicle HOT 8
- fordpass_fuel > 100% HOT 3
- fordpass.doorlock Hanging state HOT 1
- fordpass_battery 24 % HOT 1
- Remote Start Limit - How To Track, Flag, or Prevent?
- Sensors not updating either automatically or manually HOT 3
- Ignition Status always on
- Trunk/Frunk Entity? HOT 2
- 401 Client Error: Unauthorized HOT 5
- Auto Refresh HOT 2
- Occasionally getting stuck on UNLOCKING status
- Warning from Temp Sensor Ford Focus HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fordpass-ha.