Commit c321250 1 parent 354b9fc commit c321250 Copy full SHA for c321250
File tree 2 files changed +5
-5
lines changed
custom_components/zha_toolkit
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -652,12 +652,12 @@ async def async_setup(hass, config):
652
652
return True
653
653
654
654
LOGGER .debug ("Setup services from async_setup" )
655
- register_services (hass )
655
+ await register_services (hass )
656
656
657
657
return True
658
658
659
659
660
- def register_services (hass ): # noqa: C901
660
+ async def register_services (hass ): # noqa: C901
661
661
global LOADED_VERSION # pylint: disable=global-statement
662
662
hass_ref = hass
663
663
@@ -705,7 +705,7 @@ async def toolkit_service(service):
705
705
LOGGER .debug ("module is %s" , module )
706
706
importlib .reload (u )
707
707
708
- currentVersion = hass . async_add_executor_job ( u .getVersion )
708
+ currentVersion = await u .getVersion ( )
709
709
if currentVersion != LOADED_VERSION :
710
710
LOGGER .debug (
711
711
"Reload services because VERSION changed from %s to %s" ,
@@ -860,7 +860,7 @@ async def toolkit_service(service):
860
860
schema = value ,
861
861
)
862
862
863
- LOADED_VERSION = u .getVersion ()
863
+ LOADED_VERSION = await u .getVersion ()
864
864
865
865
866
866
async def command_handler_default (
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ def getZigpyVersion() -> str:
55
55
return ZIGPY_VERSION
56
56
57
57
58
- def getVersion () -> str :
58
+ async def getVersion () -> str :
59
59
# pylint: disable=global-variable-undefined,used-before-assignment
60
60
# pylint: disable=global-statement
61
61
global VERSION_TIME
You can’t perform that action at this time.
0 commit comments