diff --git a/.bumpversion.cfg b/.bumpversion.cfg index a101966..b828d54 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.1.1 +current_version = 1.1.3 parse = (?P\d+)(\.(?P\d+))(\.(?P\d+))(?P[bf]*)(?P\d*) commit = True tag = True diff --git a/custom_components/mega/i2c.py b/custom_components/mega/i2c.py index 6ce08b6..404adb3 100644 --- a/custom_components/mega/i2c.py +++ b/custom_components/mega/i2c.py @@ -93,7 +93,7 @@ i2c_classes = { DeviceType(DEVICE_CLASS_TEMPERATURE, TEMP_CELSIUS, None), ], 'sht31': [ - DeviceType(DEVICE_CLASS_HUMIDITY, PERCENTAGE, None, delay=0.5), + DeviceType(DEVICE_CLASS_HUMIDITY, PERCENTAGE, None, delay=1.5), DeviceType(DEVICE_CLASS_TEMPERATURE, TEMP_CELSIUS, None), ], 'max44009': [ diff --git a/custom_components/mega/manifest.json b/custom_components/mega/manifest.json index a2534ec..55e1176 100644 --- a/custom_components/mega/manifest.json +++ b/custom_components/mega/manifest.json @@ -15,5 +15,5 @@ "@andvikt" ], "issue_tracker": "https://github.com/andvikt/mega_hacs/issues", - "version": "v1.1.1" + "version": "v1.1.3" } \ No newline at end of file diff --git a/custom_components/mega/tools.py b/custom_components/mega/tools.py index aab64b7..5c4c63e 100644 --- a/custom_components/mega/tools.py +++ b/custom_components/mega/tools.py @@ -50,6 +50,10 @@ class PriorityLock(asyncio.Lock): finally: self.release() + @property + def _loop(self): + return asyncio.get_event_loop() + async def acquire(self, priority=0) -> bool: """Acquire a lock.