Skip to content

Commit

Permalink
remove vehicle_moving entity
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverrahner committed Dec 5, 2023
1 parent 3517ebc commit a8674e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion volkswagencarnet/vw_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,9 @@ def create_instruments():
device_class=VWDeviceClass.WINDOW,
reverse_state=True,
),
BinarySensor(attr="vehicle_moving", name="Vehicle Moving", device_class=VWDeviceClass.MOVING),
## not used currently, because we only update parkingposition when the last trip's data has changed, because
## of its rate limiting, so this is not reliable at all...
# BinarySensor(attr="vehicle_moving", name="Vehicle Moving", device_class=VWDeviceClass.MOVING),
BinarySensor(attr="request_in_progress", name="Request in progress", device_class=VWDeviceClass.CONNECTIVITY),
]

Expand Down
2 changes: 2 additions & 0 deletions volkswagencarnet/vw_vehicle.py
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,8 @@ def is_position_supported(self) -> bool:
def vehicle_moving(self) -> bool:
"""Return true if vehicle is moving."""
# there is not "isMoving" property anymore in VW's API, so we just take the absence of position data as the indicator
## not used currently, because we only update parkingposition when the last trip's data has changed, because
## of its rate limiting, so this is not reliable at all...
return not is_valid_path(self.attrs, "parkingposition.lat")

@property
Expand Down

0 comments on commit a8674e4

Please sign in to comment.