Custom Component: Cover Time Based

you should update to the latest, already fixed.

Hello,

Some time ago my automations stop working. I can open, close and stop but automations don’t work.
I get the folowing error:



Logger: homeassistant.components.script.persiana_da_direita_2_up
Source: components/broadlink/remote.py:157
Integration: Script (documentation, issues)
First occurred: 19:35:39 (1 occurrences)
Last logged: 19:35:39
persiana_da_direita_2_up: Error executing script. Unexpected error for call_service at pos 1: Command not found: 'open'

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/broadlink/remote.py", line 155, in _extract_codes
    codes = self._codes[device][cmd]
KeyError: 'persiana_da_direita_2'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 381, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 584, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1495, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 209, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 663, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 896, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 700, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/broadlink/remote.py", line 232, in async_send_command
    code_list = self._extract_codes(commands, subdevice)
  File "/usr/src/homeassistant/homeassistant/components/broadlink/remote.py", line 157, in _extract_codes
    raise ValueError(f"Command not found: {repr(cmd)}") from err
ValueError: Command not found: 'open'


I didn’t changed anything, just updated HA.
Could someone please help me? I tried searching for a fixe but didn’t found it.

Raul Nunes

Looks like an issue with broadlink component.

It seems like it but I can’t figure it out what.
Searched Google but found nothing…

Command not found: 'open'

It’s broken…

I saw that. What do I have to do?

Complain to broadlink component author.

Hi @robi , thank you and David Ramos for your wonderful work.
I would like to ask you, if you can consider to merge in your implementation, where you recently added the cover based entity id (as alternative of previous script based configuration) the sync of the position when the cover is managed by physical switch.
There is a fork that seems implemented it

but that is supporting only script configuration and not also the cover configuration.

thanks
bye
Marco

Sorry Marco, kotborealis’s mods are too deep and cannot be merged 1:1 without breaking original functionality as intended here.

thank you for your prompt feedback!
maybe are you considering to implement such kind of synchronization at least for the cover based configuration that hopefully it could be easier (I don’t know how i can say it since I’m not a programmer) ? :slight_smile:

It works very well as it is now, sorry.

This is really close to my scenario. Could you help me translate this? I’m very new to HA so the scripts are confusing to me.

I was able to translate this myself and it helped me SOOOO much. Can’t thank you enough for taking the time to make such a detailed description of your method.

1 Like

Thanks, sorry I could not answer in time, glad you could manage. I will update the code to be all in English, as soon as I can.

Just a note: I had to restart home assistant twice after installing the component via HACS, as otherwise it would not validate the configuration.yaml after adding the cover, just got stuck, no errors so I after another restart all got validated nicely.

1 Like

Hello in ha 2022.7+ have a problem not working this [Custom Component: Cover Time Based] last vorking 2022.6.7
Can help with it?

Yep same here.
Must use the old python deps

Just got to wait till the component get an update (not the only component that needs updating - theres lots)

`## Весь журнал

2022-07-20 02:22:33 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

2022-07-20 02:22:33 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration cover_time_based which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

2022-07-20 02:22:33 WARNING (SyncWorker_5) [homeassistant.loader] We found a custom integration mega which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

2022-07-20 02:22:33 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration dataplicity which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

2022-07-20 02:22:33 WARNING (SyncWorker_6) [homeassistant.loader] We found a custom integration scheduler which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

2022-07-20 02:22:33 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration schedule_state which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

2022-07-20 02:22:33 WARNING (SyncWorker_4) [homeassistant.loader] We found a custom integration xiaomi_miot which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

2022-07-20 02:22:42 ERROR (MainThread) [homeassistant.components.automation] Blueprint MEGA: универсальный generated invalid automation with inputs OrderedDict([(‘type’, ‘double’), (‘sensor’, ‘binary_sensor.mega_19’), (‘action’, [OrderedDict([(‘condition’, ‘state’), (‘entity_id’, ‘light.mega1_27’), (‘for’, OrderedDict([(‘hours’, 0), (‘minutes’, 10), (‘seconds’, 0)]))])])]): required key not provided @ data[‘action’][0][‘state’]. Got None

2022-07-20 02:22:43 ERROR (MainThread) [homeassistant.components.automation] Blueprint MEGA: универсальный generated invalid automation with inputs OrderedDict([(‘type’, ‘single’), (‘sensor’, ‘binary_sensor.mega1_16’), (‘action’, [OrderedDict([(‘service’, ‘cover.open_cover’), (‘data’, OrderedDict()), (‘target’, OrderedDict([(‘entity_id’, ‘cover.shtora_spalnia’)]))]), OrderedDict([(‘device_id’, ‘’), (‘domain’, ‘’), (‘entity_id’, ‘’)])])]): Integration ‘’ not found. Got <homeassistant.components.blueprint.models.BlueprintInputs object at 0xaf4af070>

2022-07-20 02:22:46 WARNING (MainThread) [homeassistant.components.number] custom_components.xiaomi_miot.number::MiotNumberSubEntity is overriding deprecated methods on an instance of NumberEntity, this is not valid and will be unsupported from Home Assistant 2022.10. Please report it to the custom component author.

2022-07-20 02:22:46 WARNING (MainThread) [homeassistant.components.number] custom_components.xiaomi_miot.number::MiotNumberActionSubEntity is overriding deprecated methods on an instance of NumberEntity, this is not valid and will be unsupported from Home Assistant 2022.10. Please report it to the custom component author.

2022-07-20 02:22:50 ERROR (MainThread) [custom_components.xiaomi_miot.vacuum] Mijia Robot Vacuum-Mop 2Pro(ijai.vacuum.v13): Got MiioException while fetching the state: {‘code’: -9999, ‘message’: ‘user ack timeout’}, mapping: {‘vacuum.status’: {‘siid’: 2, ‘piid’: 1}, ‘vacuum.fault’: {‘siid’: 2, ‘piid’: 2}, ‘vacuum.mode’: {‘siid’: 2, ‘piid’: 4}, ‘vacuum.sweep_type’: {‘siid’: 2, ‘piid’: 8}, ‘vacuum.on’: {‘siid’: 2, ‘piid’: 9}, ‘disturb.dnd_enable’: {‘siid’: 12, ‘piid’: 1}, ‘disturb.dnd_start_hour’: {‘siid’: 12, ‘piid’: 2}, ‘disturb.dnd_start_minute’: {‘siid’: 12, ‘piid’: 3}, ‘disturb.dnd_end_hour’: {‘siid’: 12, ‘piid’: 4}, ‘disturb.dnd_end_minute’: {‘siid’: 12, ‘piid’: 5}, ‘disturb.multi_prop_dnd’: {‘siid’: 12, ‘piid’: 7}, ‘map.remember_state’: {‘siid’: 10, ‘piid’: 1}, ‘map.cur_map_id’: {‘siid’: 10, ‘piid’: 2}, ‘map.map_num’: {‘siid’: 10, ‘piid’: 3}, ‘map.cur_cleaning_path’: {‘siid’: 10, ‘piid’: 5}, ‘map.build_map’: {‘siid’: 10, ‘piid’: 14}, ‘map.has_new_map’: {‘siid’: 10, ‘piid’: 19}, ‘sweep.repeat_state’: {‘siid’: 7, ‘piid’: 1}, ‘sweep.door_state’: {‘siid’: 7, ‘piid’: 3}, ‘sweep.cloth_state’: {‘siid’: 7, ‘piid’: 4}, ‘sweep.suction_state’: {‘siid’: 7, ‘piid’: 5}, ‘sweep.water_state’: {‘siid’: 7, ‘piid’: 6}, ‘sweep.mop_route’: {‘siid’: 7, ‘piid’: 7}, ‘sweep.side_brush_life’: {‘siid’: 7, ‘piid’: 8}, ‘sweep.side_brush_hours’: {‘siid’: 7, ‘piid’: 9}, ‘sweep.main_brush_life’: {‘siid’: 7, ‘piid’: 10}, ‘sweep.main_brush_hours’: {‘siid’: 7, ‘piid’: 11}, ‘sweep.hypa_life’: {‘siid’: 7, ‘piid’: 12}, ‘sweep.hypa_hours’: {‘siid’: 7, ‘piid’: 13}, ‘sweep.mop_life’: {‘siid’: 7, ‘piid’: 14}, ‘sweep.mop_hours’: {‘siid’: 7, ‘piid’: 15}, ‘sweep.direction’: {‘siid’: 7, ‘piid’: 16}, ‘sweep.time_zone’: {‘siid’: 7, ‘piid’: 20}, ‘sweep.cur_lang’: {‘siid’: 7, ‘piid’: 21}, ‘sweep.cleaning_time’: {‘siid’: 7, ‘piid’: 22}, ‘sweep.cleaning_area’: {‘siid’: 7, ‘piid’: 23}, ‘sweep.dirt_recognize’: {‘siid’: 7, ‘piid’: 35}, ‘sweep.pet_recognize’: {‘siid’: 7, ‘piid’: 36}, ‘sweep.ai_recognize’: {‘siid’: 7, ‘piid’: 42}, ‘sweep.carpet_booster’: {‘siid’: 7, ‘piid’: 44}, ‘sweep.multi_prop_vacuum’: {‘siid’: 7, ‘piid’: 45}, ‘sweep.carpet_avoid’: {‘siid’: 7, ‘piid’: 47}, ‘sweep.tank_shake’: {‘siid’: 7, ‘piid’: 48}, ‘sweep.electrolysis’: {‘siid’: 7, ‘piid’: 49}, ‘sweep.map_encrypt’: {‘siid’: 7, ‘piid’: 55}, ‘alarm’: {‘siid’: 4, ‘piid’: 1}, ‘alarm.volume’: {‘siid’: 4, ‘piid’: 2}, ‘battery_level’: {‘siid’: 3, ‘piid’: 1}}, max_properties: 10/48

2022-07-20 02:22:52 ERROR (MainThread) [homeassistant.helpers.template_entity] TemplateError(‘UndefinedError: ‘value’ is undefined’) while processing template ‘Template("{{ states(‘sensor.uart_electric_params’).split(‘Done’)[2].split(’|’)}} {{ value | int(value,16) }}")’ for attribute ‘_attr_available’ in entity ‘sensor.electric_use_active_power’

2022-07-20 02:23:21 ERROR (MainThread) [homeassistant.components.automation.novaia_avtomatizatsiia] Свет спальня Пк: Error executing script. Unexpected error for device at pos 1: ‘NoneType’ object has no attribute ‘create_future’

Traceback (most recent call last):

File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 447, in _async_step

await getattr(self, handler)()

File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 688, in _async_device_step

await device_action.async_call_action_from_config(

File “/usr/src/homeassistant/homeassistant/components/device_automation/action.py”, line 76, in async_call_action_from_config

await platform.async_call_action_from_config(hass, config, variables, context)

File “/usr/src/homeassistant/homeassistant/components/light/device_action.py”, line 65, in async_call_action_from_config

await toggle_entity.async_call_action_from_config(

File “/usr/src/homeassistant/homeassistant/components/device_automation/toggle_entity.py”, line 128, in async_call_action_from_config

await hass.services.async_call(

File “/usr/src/homeassistant/homeassistant/core.py”, line 1713, in async_call

task.result()

File “/usr/src/homeassistant/homeassistant/core.py”, line 1750, in _execute_service

await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(

File “/usr/src/homeassistant/homeassistant/helpers/entity_component.py”, line 204, in handle_service

await service.entity_service_call(

File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 680, in entity_service_call

future.result() # pop exception if have

File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 930, in async_request_call

await coro

File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 717, in _handle_entity_call

await result

File “/usr/src/homeassistant/homeassistant/components/light/init.py”, line 569, in async_handle_toggle_service

await async_handle_light_on_service(light, call)

File “/usr/src/homeassistant/homeassistant/components/light/init.py”, line 553, in async_handle_light_on_service

await light.async_turn_on(**filter_turn_on_params(light, params))

File “/config/custom_components/mega/entities.py”, line 478, in async_turn_on

await self.mega.request(**_cmd, priority=-1)

File “/config/custom_components/mega/hub.py”, line 300, in request

async with self._http_lck(priority):

File “/usr/local/lib/python3.10/contextlib.py”, line 199, in aenter

return await anext(self.gen)

File “/config/custom_components/mega/tools.py”, line 47, in _with_priority

await self.acquire(p)

File “/config/custom_components/mega/tools.py”, line 67, in acquire

fut = self._loop.create_future()

AttributeError: ‘NoneType’ object has no attribute ‘create_future’

2022-07-20 02:23:21 ERROR (MainThread) [homeassistant.components.automation.novaia_avtomatizatsiia] While executing automation automation.novaia_avtomatizatsiia

Traceback (most recent call last):

File “/usr/src/homeassistant/homeassistant/components/automation/init.py”, line 521, in async_trigger

await self.action_script.async_run(

File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 1513, in async_run

await asyncio.shield(run.async_run())

File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 405, in async_run

await self._async_step(log_exceptions=False)

File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 449, in _async_step

self._handle_exception(

File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 472, in _handle_exception

raise exception

File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 447, in _async_step

await getattr(self, handler)()

File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 688, in _async_device_step

await device_action.async_call_action_from_config(

File “/usr/src/homeassistant/homeassistant/components/device_automation/action.py”, line 76, in async_call_action_from_config

await platform.async_call_action_from_config(hass, config, variables, context)

File “/usr/src/homeassistant/homeassistant/components/light/device_action.py”, line 65, in async_call_action_from_config

await toggle_entity.async_call_action_from_config(

File “/usr/src/homeassistant/homeassistant/components/device_automation/toggle_entity.py”, line 128, in async_call_action_from_config

await hass.services.async_call(

File “/usr/src/homeassistant/homeassistant/core.py”, line 1713, in async_call

task.result()

File “/usr/src/homeassistant/homeassistant/core.py”, line 1750, in _execute_service

await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(

File “/usr/src/homeassistant/homeassistant/helpers/entity_component.py”, line 204, in handle_service

await service.entity_service_call(

File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 680, in entity_service_call

future.result() # pop exception if have

File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 930, in async_request_call

await coro

File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 717, in _handle_entity_call

await result

File “/usr/src/homeassistant/homeassistant/components/light/init.py”, line 569, in async_handle_toggle_service

await async_handle_light_on_service(light, call)

File “/usr/src/homeassistant/homeassistant/components/light/init.py”, line 553, in async_handle_light_on_service

await light.async_turn_on(**filter_turn_on_params(light, params))

File “/config/custom_components/mega/entities.py”, line 478, in async_turn_on

await self.mega.request(**_cmd, priority=-1)

File “/config/custom_components/mega/hub.py”, line 300, in request

async with self._http_lck(priority):

File “/usr/local/lib/python3.10/contextlib.py”, line 199, in aenter

return await anext(self.gen)

File “/config/custom_components/mega/tools.py”, line 47, in _with_priority

await self.acquire(p)

File “/config/custom_components/mega/tools.py”, line 67, in acquire

fut = self._loop.create_future()

AttributeError: ‘NoneType’ object has no attribute ‘create_future’

2022-07-20 02:24:52 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall homeassistant.turn_on (c:01G8CCEMFAQTDZKYVR074VNMR9): entity_id=[‘light.mega2_08’]>

Traceback (most recent call last):

File “/usr/src/homeassistant/homeassistant/core.py”, line 1731, in catch_exceptions

await coro_or_task

File “/usr/src/homeassistant/homeassistant/core.py”, line 1750, in _execute_service

await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(

File “/usr/src/homeassistant/homeassistant/components/homeassistant/init.py”, line 124, in async_handle_turn_service

await asyncio.gather(*tasks)

File “/usr/src/homeassistant/homeassistant/core.py”, line 1713, in async_call

task.result()

File “/usr/src/homeassistant/homeassistant/core.py”, line 1750, in _execute_service

await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(

File “/usr/src/homeassistant/homeassistant/helpers/entity_component.py”, line 204, in handle_service

await service.entity_service_call(

File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 680, in entity_service_call

future.result() # pop exception if have

File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 930, in async_request_call

await coro

File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 717, in _handle_entity_call

await result

File “/usr/src/homeassistant/homeassistant/components/light/init.py”, line 553, in async_handle_light_on_service

await light.async_turn_on(**filter_turn_on_params(light, params))

File “/config/custom_components/mega/entities.py”, line 478, in async_turn_on

await self.mega.request(**_cmd, priority=-1)

File “/config/custom_components/mega/hub.py”, line 300, in request

async with self._http_lck(priority):

File “/usr/local/lib/python3.10/contextlib.py”, line 199, in aenter

return await anext(self.gen)

File “/config/custom_components/mega/tools.py”, line 47, in _with_priority

await self.acquire(p)

File “/config/custom_components/mega/tools.py”, line 67, in acquire

fut = self._loop.create_future()

AttributeError: ‘NoneType’ object has no attribute ‘create_future’

2022-07-20 02:24:53 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall homeassistant.turn_off (c:01G8CCENF83VT6NWYNT9WG2H29): entity_id=[‘light.mega2_09’]>

Traceback (most recent call last):

File “/usr/src/homeassistant/homeassistant/core.py”, line 1731, in catch_exceptions

await coro_or_task

File “/usr/src/homeassistant/homeassistant/core.py”, line 1750, in _execute_service

await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(

File “/usr/src/homeassistant/homeassistant/components/homeassistant/init.py”, line 124, in async_handle_turn_service

await asyncio.gather(*tasks)

File “/usr/src/homeassistant/homeassistant/core.py”, line 1713, in async_call

task.result()

File “/usr/src/homeassistant/homeassistant/core.py”, line 1750, in _execute_service

await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(

File “/usr/src/homeassistant/homeassistant/helpers/entity_component.py”, line 204, in handle_service

await service.entity_service_call(

File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 680, in entity_service_call

future.result() # pop exception if have

File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 930, in async_request_call

await coro

File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 717, in _handle_entity_call

await result

File “/usr/src/homeassistant/homeassistant/components/light/init.py”, line 562, in async_handle_light_off_service

await light.async_turn_off(**filter_turn_off_params(light, params))

File “/config/custom_components/mega/entities.py”, line 509, in async_turn_off

await self.mega.request(**_cmd, priority=-1)

File “/config/custom_components/mega/hub.py”, line 300, in request

async with self._http_lck(priority):

File “/usr/local/lib/python3.10/contextlib.py”, line 199, in aenter

return await anext(self.gen)

File “/config/custom_components/mega/tools.py”, line 47, in _with_priority

await self.acquire(p)

File “/config/custom_components/mega/tools.py”, line 67, in acquire

fut = self._loop.create_future()

AttributeError: ‘NoneType’ object has no attribute ‘create_future’

2022-07-20 02:24:54 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall homeassistant.turn_on (c:01G8CCEPMWNVZ7QH6H7Q229SCB): entity_id=[‘light.mega2_09’]>

Traceback (most recent call last):

File “/usr/src/homeassistant/homeassistant/core.py”, line 1731, in catch_exceptions

await coro_or_task

File “/usr/src/homeassistant/homeassistant/core.py”, line 1750, in _execute_service

await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(

File “/usr/src/homeassistant/homeassistant/components/homeassistant/init.py”, line 124, in async_handle_turn_service

await asyncio.gather(*tasks)

File “/usr/src/homeassistant/homeassistant/core.py”, line 1713, in async_call

task.result()

File “/usr/src/homeassistant/homeassistant/core.py”, line 1750, in _execute_service

await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(

File “/usr/src/homeassistant/homeassistant/helpers/entity_component.py”, line 204, in handle_service

await service.entity_service_call(

File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 680, in entity_service_call

future.result() # pop exception if have

File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 930, in async_request_call

await coro

File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 717, in _handle_entity_call

await result

File “/usr/src/homeassistant/homeassistant/components/light/init.py”, line 553, in async_handle_light_on_service

await light.async_turn_on(**filter_turn_on_params(light, params))

File “/config/custom_components/mega/entities.py”, line 478, in async_turn_on

await self.mega.request(**_cmd, priority=-1)

File “/config/custom_components/mega/hub.py”, line 300, in request

async with self._http_lck(priority):

File “/usr/local/lib/python3.10/contextlib.py”, line 199, in aenter

return await anext(self.gen)

File “/config/custom_components/mega/tools.py”, line 47, in _with_priority

await self.acquire(p)

File “/config/custom_components/mega/tools.py”, line 67, in acquire

fut = self._loop.create_future()

AttributeError: ‘NoneType’ object has no attribute ‘create_future’

2022-07-20 02:24:55 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall homeassistant.turn_off (c:01G8CCEQQN105QP68AFFER98HK): entity_id=[‘light.mega2_09’]>

Traceback (most recent call last):

File “/usr/src/homeassistant/homeassistant/core.py”, line 1731, in catch_exceptions

await coro_or_task

File “/usr/src/homeassistant/homeassistant/core.py”, line 1750, in _execute_service

await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(

File “/usr/src/homeassistant/homeassistant/components/homeassistant/init.py”, line 124, in async_handle_turn_service

await asyncio.gather(*tasks)

File “/usr/src/homeassistant/homeassistant/core.py”, line 1713, in async_call

task.result()

File “/usr/src/homeassistant/homeassistant/core.py”, line 1750, in _execute_service

await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(

File “/usr/src/homeassistant/homeassistant/helpers/entity_component.py”, line 204, in handle_service

await service.entity_service_call(

File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 680, in entity_service_call

future.result() # pop exception if have

File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 930, in async_request_call

await coro

File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 717, in _handle_entity_call

await result

File “/usr/src/homeassistant/homeassistant/components/light/init.py”, line 562, in async_handle_light_off_service

await light.async_turn_off(**filter_turn_off_params(light, params))

File “/config/custom_components/mega/entities.py”, line 509, in async_turn_off

await self.mega.request(**_cmd, priority=-1)

File “/config/custom_components/mega/hub.py”, line 300, in request

async with self._http_lck(priority):

File “/usr/local/lib/python3.10/contextlib.py”, line 199, in aenter

return await anext(self.gen)

File “/config/custom_components/mega/tools.py”, line 47, in _with_priority

await self.acquire(p)

File “/config/custom_components/mega/tools.py”, line 67, in acquire

fut = self._loop.create_future()

AttributeError: ‘NoneType’ object has no attribute ‘create_future’`

These errors have nothing to do with the time based cover custom component.
Running fine here on latest 2022.7.5

2022.7.5 not working