mirror of https://github.com/home-assistant/core
Fix non-awaited coroutine in BMW notify (#76664)
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
This commit is contained in:
parent
563e899d2e
commit
a86397cc10
|
@ -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.")
|
||||
|
|
Loading…
Reference in New Issue