Heb uiteindelijk maar een soort van factory reset gedaan. Configuration.yaml weg gegooid en de database die toch al een paar GB groot was verwijderd. Na opstarten begon HA inderdaad met een frisse interface en de config check gaat goed.
Ben gelijk met de afvalkalender begonnen. Bestandjes opnieuw gedownload en in de /custom_componenten/afvalbeheer geplaatst. Maar als ik de sensor code in de Configuration.yaml opneem gaat het wederom mis. De config check blijft laden en doet niks. Haal ik de code weer weg is de config weer in orde.
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| # Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# Text to speech
tts:
- platform: google_translate
sensor:
- platform: afvalbeheer
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml |
Zelfs als ik alleen
code:
1
2
| sensor:
- platform: afvalbeheer |
in de yaml file zet werkt de config check niet.
In de LOG zie ik één error ( Error handling request)
Code
Logger: aiohttp.server
Source: loader.py:541
First occurred: 11:00:23 AM (1 occurrences)
Last logged: 11:00:23 AM
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 118, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 56, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 127, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 129, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/core.py", line 29, in post
errors = await async_check_ha_config_file(request.app["hass"])
File "/usr/src/homeassistant/homeassistant/config.py", line 874, in async_check_ha_config_file
res = await check_config.async_check_ha_config_file(hass)
File "/usr/src/homeassistant/homeassistant/helpers/check_config.py", line 199, in async_check_ha_config_file
p_integration = await async_get_integration_with_requirements(
File "/usr/src/homeassistant/homeassistant/requirements.py", line 47, in async_get_integration_with_requirements
integration = await async_get_integration(hass, domain)
File "/usr/src/homeassistant/homeassistant/loader.py", line 481, in async_get_integration
integration = Integration.resolve_legacy(hass, domain)
File "/usr/src/homeassistant/homeassistant/loader.py", line 259, in resolve_legacy
comp = _load_file(hass, domain, _lookup_path(hass))
File "/usr/src/homeassistant/homeassistant/loader.py", line 541, in _load_file
module = importlib.import_module(path)
File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 779, in exec_module
File "<frozen importlib._bootstrap_external>", line 916, in get_code
File "<frozen importlib._bootstrap_external>", line 846, in source_to_code
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/config/custom_components/afvalbeheer/__init__.py", line 7
<!DOCTYPE html>
^
SyntaxError: invalid syntax
De laatste regel gaat over de init .py die bij Afvalbeheer hoort.
1e regels vanaf line 7
code:
1
2
3
4
| <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"> |
Zou er dan iets niet lekker zitten in die init .py? Dit bestand gebruikt iedereen in principe. Wellicht is mijn HA setup niet compliant of iets dergelijks? utf-8?
In het topic van Afvalbeheer kon ik in ieder geval niks vinden over die Syntax error.
Zoektocht gaat verder. Moet zeggen, ook al kost het uren om dit op te lossen, het is toch wel leuk