Fix notify targets for bmw_connected_drive (#87503)

Co-authored-by: rikroe <rikroe@users.noreply.github.com>
This commit is contained in:
rikroe 2023-02-06 17:15:28 +01:00 committed by GitHub
parent a61e87c46d
commit 406a29912d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,9 +52,16 @@ def get_service(
class BMWNotificationService(BaseNotificationService):
"""Send Notifications to BMW."""
vehicle_targets: dict[str, MyBMWVehicle]
def __init__(self, targets: dict[str, MyBMWVehicle]) -> None:
"""Set up the notification service."""
self.targets: dict[str, MyBMWVehicle] = targets
self.vehicle_targets = targets
@property
def targets(self) -> dict[str, Any] | None:
"""Return a dictionary of registered targets."""
return self.vehicle_targets
async def async_send_message(self, message: str = "", **kwargs: Any) -> None:
"""Send a message or POI to the car."""