Skip to content

Commit

Permalink
Merge pull request #330 from danobot/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
danobot authored May 4, 2024
2 parents d083fe3 + 180d230 commit 673ccf4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions custom_components/entity_controller/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
Project Page: https://danielbkr.net/projects/entity-controller/
Documentation: https://github.com/danobot/entity-controller
"""
import asyncio
import hashlib
import logging
import re
Expand Down Expand Up @@ -1582,8 +1583,9 @@ def call_service(self, entity, service, **service_data):
params = service_data

params["entity_id"] = entity
self.hass.async_create_task(
self.hass.services.async_call(domain, service, service_data, context=self.context)
asyncio.run_coroutine_threadsafe(
self.hass.services.async_call(domain, service, service_data, context=self.context),
self.hass.loop
)
self.update(service_data=service_data)

Expand Down

0 comments on commit 673ccf4

Please sign in to comment.