Closed denperss closed 3 years ago
If it reports Unknown window position then the Ford API doesn't have a sensor avaliable to report the position. The integration should ignore "Unknown window position" so it doesn't report Open all the time. If it's not then there is a potential bug which I need to look into as per the original issue.
The additional window if it doesn't show in the window sensor then it isn't supported or listed in the official API as the integration grabs any window in the doors array and parses it.
@denperss @goofy7264 In regards to this bug. Can you please go to the developer tab in HA and send me all the values in the "State Attributes" area for the "fordpass_windowposition" sensor. As I can't replicate the issue my end so just want to see the exact sensor values you retrieve thanks.
It "should" catch the Undefined position in this array
window_closed_status = [
"Fully_Closed",
"Fully_closed_position",
"Undefined_window_position",
"Undefined",
]
for key, value in self.coordinator.data[self.sensor].items():
if value["value"] not in window_closed_status:
return "Open"
return "Closed"
However it looks like it might not be for you guys, so may be a simple spelling mistake on my part, if you can send me the attribute values from the raw sensor I can look at getting it fixed.
Here is what I got from the state_attributes
driverWindowPosition: Fully closed position passWindowPosition: Fully closed position rearDriverWindowPos: Undefined window position rearPassWindowPos: Undefined window position friendly_name: fordpass_windowPosition icon: 'mdi:car-door'
I think the problem may be that you have "Undefined_window_position" and it's reporting "Undefined Window Position"? not sure if the underscores are significant or not.
So where you see a space it is actually an underscore, HA just automaticly removes it. I can't see why its not working for you as that value should of hit the array and reported back as closed rather than open.
Annoyingly my truck doesn't support window statuses so makes it harder for debugging as I get a blank array back. Only thing I can think is to add a bit of debugging, unless you know how to edit HA integrations and could look at your instance for me
I may just as a test add in the spaced equivalent just incase the window bit is different to the doors.
IF you let me know what you need me to do, I can try and take a look at it.
Mine shows undefined without spaces and state is closed instead of open like yours.
RearDriverWindowPos: Undefined_window_position rearPassWindowPos: Undefined_window_position
@mclever thanks for the feedback. This is definitely a weird issue and only seems to affect a subset of people. Will have to look into this more when I have some spare time
I have this same issue.
I think only vehicles with 1-touch up down buttons actually know the position of the windows. It's why you can control the rear Windows with the key fob (this is enabled with FORScan)
This should be resolved in #104 . Can you let me know if it is for you so I can close out the issue
This should be resolved in #104 . Can you let me know if it is for you so I can close out the issue
No changes on mine. rearDriverWindowPos: Undefined_window_position rearPassWindowPos: Undefined_window_position
Do you think I need to query a refresh from the truck or drive it around for a little while?
@mclever It will still show that as that is the value because those windows aren't supported/don't have sensors in your vehicle. However does it now show as "Closed" for you as the overall state of the door sensor?
1.17 seems to have resolved this for me
Great going to close this issue for now.
It also appears to have issues with the rearpassenger and reardriver windows on f-150 CrewCab. Both report Unknow Window Position although the front windows report correctly. This may or maynot be an API issue, but it if is, is there a way to exclude those windows so the overall sensor does not show open all the time?
Also, appears that the F-150 has one additional Window (which also may not be supported in the API) for the Rear Sliding Window (may be vehicle trim/option level dependent)
Originally posted by @goofy7264 in https://github.com/itchannel/fordpass-ha/issues/92#issuecomment-808980096