Fix non-awaited coroutine in BMW notify (#76664)

Co-authored-by: rikroe <rikroe@users.noreply.github.com>
This commit is contained in:
rikroe 2022-08-12 15:19:16 +02:00 committed by GitHub
parent 563e899d2e
commit a86397cc10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ class BMWNotificationService(BaseNotificationService):
"""Set up the notification service."""
self.targets: dict[str, MyBMWVehicle] = targets
def send_message(self, message: str = "", **kwargs: Any) -> None:
async def async_send_message(self, message: str = "", **kwargs: Any) -> None:
"""Send a message or POI to the car."""
for vehicle in kwargs[ATTR_TARGET]:
vehicle = cast(MyBMWVehicle, vehicle)
@ -81,6 +81,6 @@ class BMWNotificationService(BaseNotificationService):
}
)
vehicle.remote_services.trigger_send_poi(location_dict)
await vehicle.remote_services.trigger_send_poi(location_dict)
else:
raise ValueError(f"'data.{ATTR_LOCATION}' is required.")