Skip to content

Commit

Permalink
Merge 78db4f3 into e8de3c5
Browse files Browse the repository at this point in the history
  • Loading branch information
gerard33 committed Jul 27, 2021
2 parents e8de3c5 + 78db4f3 commit adfb0b5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bimmer_connected/vehicle.py
Expand Up @@ -183,7 +183,9 @@ def available_attributes(self) -> List[str]:
'check_control_messages', 'door_lock_state', 'internalDataTimeUTC',
'parking_lights', 'positionLight', 'last_update_reason', 'singleImmediateCharging']
# required for existing Home Assistant binary sensors
result += ['lights_parking', 'lids', 'windows']
result += ['lids', 'windows']
if self.has_parking_light_state:
result += ['lights_parking']
return result

@property
Expand Down
5 changes: 5 additions & 0 deletions bimmer_connected/vehicle_status.py
Expand Up @@ -295,6 +295,11 @@ def parking_lights(self) -> ParkingLightState:
"""
return ParkingLightState(self._state.attributes[SERVICE_STATUS]['parkingLight'])

@property
def has_parking_light_state(self) -> bool:
"""Return True if parking light is available."""
return 'parkingLight' in self._state.attributes[SERVICE_STATUS]

@property
def are_parking_lights_on(self) -> bool:
"""Get status of parking lights.
Expand Down

0 comments on commit adfb0b5

Please sign in to comment.