Home Assistant release with the issue:
0.89
Last working Home Assistant release (if known):
0.88.1
Operating environment (Hass.io/Docker/Windows/etc.):
hassbian
Component/platform:
tplink
Description of problem:
tplink switch failed to load:
Problem-relevant configuration.yaml
entries and (fill out even if it seems unimportant):
switch:
- platform: tplink
host: 192.168.1.155
Traceback (if applicable):
Mar 7 07:16:33 hassbian hass[25650]: #033[31m2019-03-07 08:16:33 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform tplink#033[0m
Mar 7 07:16:33 hassbian hass[25650]: Traceback (most recent call last):
Mar 7 07:16:33 hassbian hass[25650]: File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 127, in _async_setup_platform
Mar 7 07:16:33 hassbian hass[25650]: asyncio.shield(task, loop=hass.loop),
Mar 7 07:16:33 hassbian hass[25650]: File "/usr/lib/python3.5/asyncio/tasks.py", line 712, in shield
Mar 7 07:16:33 hassbian hass[25650]: inner = ensure_future(arg, loop=loop)
Mar 7 07:16:33 hassbian hass[25650]: File "/usr/lib/python3.5/asyncio/tasks.py", line 567, in ensure_future
Mar 7 07:16:33 hassbian hass[25650]: raise TypeError('A Future, a coroutine or an awaitable is required')
Mar 7 07:16:33 hassbian hass[25650]: TypeError: A Future, a coroutine or an awaitable is required#033[0m
Additional information:
You should be getting more information than the above traceback (a warning saying that loading the platform is not anymore supported and that you need to change your configuration. See https://www.home-assistant.io/components/tplink/ and let me know if that helps!
yes, found it in a later reboot ( to fix other issues)
2019-03-07 08:58:14 WARNING (MainThread) [homeassistant.components.tplink.switch] Loading as a platform is no longer supported, convert to use the tplink component.
2019-03-07 08:58:14 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform tplink
so I suppose this is not an issue. just that the logging of the traceback itself is not very descriptive
I'm getting the same error/warning, and my tplink switch isn't showing up in hassio now. Did you do anything to resolve this or just reboot? I've tried a few reboots with no help.
Same issue here.
2019-03-09 16:14:20 WARNING (MainThread) [homeassistant.components.tplink.switch] Loading as a platform is no longer supported, convert to use the tplink component.
2019-03-09 16:14:20 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform tplink
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\homeassistant\helpers\entity_platform.py", line 127, in _async_setup_platform
asyncio.shield(task, loop=hass.loop),
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\asyncio\tasks.py", line 681, in shield
inner = ensure_future(arg, loop=loop)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\asyncio\tasks.py", line 526, in ensure_future
raise TypeError('An asyncio.Future, a coroutine or an awaitable is '
TypeError: An asyncio.Future, a coroutine or an awaitable is required
Since upgrading to the last HASS I am also unable to use my TP LINK switch:
019-03-09 14:59:42 WARNING (MainThread) [homeassistant.components.tplink.switch] Loading as a platform is no longer supported, convert to use the tplink component.
2019-03-09 14:59:42 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform tplink
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 127, in _async_setup_platform
asyncio.shield(task, loop=hass.loop),
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 769, in shield
inner = ensure_future(arg, loop=loop)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 592, in ensure_future
raise TypeError('An asyncio.Future, a coroutine or an awaitable is '
TypeError: An asyncio.Future, a coroutine or an awaitable is required
The commenter above had the answer, I just didn鈥檛 quite get it at first. The TP-Link component changed formats but the outdated website is still the top search result. Check https://www.home-assistant.io/components/tplink/ and update your config to the new format.
Many thanks for the quick response!
The removal of those old files got lost during merges (I suppose), but the fix has been merged already (unfortunately only for the next release): https://github.com/home-assistant/home-assistant.io/pull/8853
they need to remove the tp-link switch from the switch/components screen... using the new format posted above worked for me.
Under this new component format, if I want to have HA discover some but not all tplink devices, I understand I have to manually add the specific devices using the new format in configuration.yaml, but do I also have to hit configure the tplink integration in the webUI for it to work?
No need to configure it in the UI, that is only necessary if you want to avoid manual configuration and use the discovery.
Thanks! The issue I'm having is that my lights and switches originally show up and work fine. After about an hour, however, they disappear. First tried UI configuration where all the devices are originally discovered. When those dropped off, I switched to manually configuration, thinking fewer devices and making IPs static might make it more stable. Same issue; they showed at first then vanished. Devices are still showing and working through app. Only hint of them in HA is the two devices I put in a separate group. Those show as "unavailable" notices. All the rest just don't show up in the unchartegorized "switches" card. Any thoughts?
Hello,
I am still new at this and am getting the error:
"Invalid config for [switch]: required key not provided @ data['platform']. Got None. (See /config/configuration.yaml, line 129). Please check the docs at https://home-assistant.io/components/switch/"
my config.yaml
tplink:
discovery: false
switch:
- host: 192.168.1.XXX
- host: 192.168.1.XXY
Hello,
I am still new at this and am getting the error:
"Invalid config for [switch]: required key not provided @ data['platform']. Got None. (See /config/configuration.yaml, line 129). Please check the docs at https://home-assistant.io/components/switch/"my config.yaml
tplink:
discovery: false
switch:
- host: 192.168.1.XXX
- host: 192.168.1.XXY
That seems like it's close to mine, hard to tell with your formatting, but here's how mine looks and it's working okay.
tplink:
discovery: false
switch:
- host: 192.168.1.XXX
edit: formatting. Also from googling that error it sounds like formatting can cause the error you got, so check your indentation etc to make sure your formatting looks like what I posted.
Most helpful comment
The commenter above had the answer, I just didn鈥檛 quite get it at first. The TP-Link component changed formats but the outdated website is still the top search result. Check https://www.home-assistant.io/components/tplink/ and update your config to the new format.