Closed Qpernicus closed 1 year ago
sounds to me like you also have DD installed. you will have to make sure that you follow some steps to make both dashboards work since they both use a component (lovelace_gen) which can only be used once.
I had that installed, but uninstalled, only left the config-yamls, but no lovelace_gen there.. as far as i can see.
I removed the dwains files just in case..
I might be mistaken but after reboot, it still gives the error...or its from just BEFORE reboot
You should clear the logs first and then reboot, but now we are on the subject,
Do you have the DD component installed? Dwains Dash uses a modified lovelace_gen, they are named differently, but they are conflicting.
Your error states that it can not find the dictionary object views:
, which is a required dictionary object for HKI. If you have installed HKI with lovelace_gen and don't use any other dashboard with that, then it should work without a problem. If you have DD installed you already have lovelace_gen and you must uninstall lovelace_gen from HKI as well as the need for commenting out line 1 in /packages/homekit-infused/hki_configuration.yaml
, you will have to do this commenting out of line 1 every time you update HKI.
Last thing I can think of is that you have removed line 1
in /hki-user/config/views.yaml
which should have the value views:
, if that is the case then it will also fail to find the views value.
One more thing, I have no idea about any compatibility with other dashboards that use some form of lovelace_gen (maybe minimalist ui for example). For now the only officially supported dashboards by HKI are the default HA storage dashboards, custom YAML dashboards, energy dashboards and Dwains dashboard. If you happen to have uninstalled DD completely, this will also mean that you don't have lovelace_gen anymore (and you will need to install that and uncomment the line in the config file). If you did disable DD and still have it installed it will probably still load the DD component and thus you will have to do the opposite by not using lovelace_gen.
I will give you a tip on reading errors, usually the actual error is displayed somewhere in the last 10 lines, in this case:
File "/config/hki-base/base.yaml", line 4, in top-level template code
{% for name, data in _global.views.items() %}
File "/usr/local/lib/python3.10/site-packages/jinja2/environment.py", line 485, in getattr
return getattr(obj, attribute)
jinja2e.exceptions.UndefinedError: 'dict object' has no attribute 'views'
The last line explains what the error is, in this case it means that it can simply not find the dictionary object named views (which is defined in /hki-user/config/views.yaml
on line 1
).
EDIT: You could share the first few lines of your views.yaml
file if you want me to take a look at it (if you use any split file configuration, please also share the first few lines of any of your views.
Views.yaml:
views: !include_dir_merge_named ../views
if you use any split file configuration, please also share the first few lines of any of your views.
I split up the whole config, or do you mean HKI specific?
My views are split up like yours mainly. Zo above in views.yaml, and this in de folder views:
# Home
home:
title: greeting
But my whole config is more like this:
configuration.yaml:
homeassistant: !include_dir_merge_named /config/includes/home_assistant
in that folder, customize.yaml, auth_mfa and packages.yaml. In packages.yaml:
packages: !include_dir_named /config/includes/integrations
In that folder a folder include with all the different stuff you normally find in configuration.yaml and a folder packages with your hki packages folder (i adjusted the '!Includes' accordingly)..
And my config splits like that
I'm leaning towards saying this is fixed
A couple of days ago I reinstalled lovelace_gen after removing the dwain files. Since then I didn't see the error (although I didn't reboot often) and my GUI didn't hang
@Qpernicus my apologies for not replying sooner, I have looked into your issue, but it is very hard to debug something like this when the default options are changed (in your case paths to specific folders and such).
But your last message sounds good, it should work properly when the files are found. If you don't get the error then I assume it is working correctly now (you could try restarting a couple of times just to be sure).
Mmmmm annoyingly it's still there intermittently. Ran out of resources to troubleshoot
I have read your messages, but honestly I wouldn't really know how to help you without knowing exactly what you have installed (other than HKI), how you have set your HA up as you have mentioned that you have split everything up into separate parts.
HKI was written in such a way that it works fine when a default install was done. But since your install is everything but default, I would have to check out everything.
If you join me on discord we might be able to find some solution to this (either by doing streams or remote desktop or something like that).
Hi. Sorry I forgot to reply here. Decided to leave HKI for now. I wasn't will to go all-in on HKI, and the troubles stayed so I removed everything into a backup folder for perhaps a later day.
Ok, so my frontend gets unresponsive since installing and using HKI. Although i have no direct cause for this, it just seems to get itself stuck (black screen, no buttons). But since installing HKI i also get this in my log quite frequently:
So my assumption is: The error in HKI Base causes the system to loop itself into destruction. Only thing i changed in the last 10 days is using HKI, only time i have these hiccups is the last 10 days. Not scientific i know.