Since switching the tv on fails from time to time and there is no fix in sight, I need to bugfix this issue:
opened 10:50AM - 05 Feb 22 UTC
integration: webostv
### The problem
Since core-2022.2.1 LG webOS Smart TV is available from the U… I, and power on is possible through a automation like explained here: [https://github.com/home-assistant/core/issues/65461#issuecomment-1028456127](url)
After updating to core-2022.2.1 I removed the integration from the configuration.yaml since it was automatically added, and I used the automation mentioned above, this made the power on button available again while the TV was turned off.
But after a while the power button disappears when the TV is turned off, only way to get the power button back is, by reloading the automations. It looks like when the TV is turned off there is an error with header: `Error unloading entry` see below for more log information.
I think disappearing power button has to do with this error.
### What version of Home Assistant Core has the issue?
core-2022.2.2
### What was the last working version of Home Assistant Core?
_No response_
### What type of installation are you running?
Home Assistant OS
### Integration causing the issue
LG webOS Smart TV
### Link to integration documentation on our website
https://www.home-assistant.io/integrations/webostv/
### Diagnostics information
_No response_
### Example YAML snippet
_No response_
### Anything in the logs that might be useful for us?
```txt
2022-02-05 08:11:43 ERROR (MainThread) [homeassistant.config_entries]
Error unloading entry Woonkamer TV LG for media_player Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 466, in async_unload result = await component.async_unload_entry(hass, self)
File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 383, in async_unload_entry return await component.async_unload_entry(entry)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 172, in async_unload_entry raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
```
### Additional information
_No response_
When it fails, the automation that should wake the TV is not visible under automations. It is present in the yaml file. After reloading the automations or restarting HA, it is back and works.
My plan is to check if this automation is loaded/present. If not then reload all automations like it is possible under developer tools
How can I do this?