Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Check Config" link in Configurator settings #183

Open
GaryOkie opened this issue Feb 16, 2020 · 6 comments
Open

Add "Check Config" link in Configurator settings #183

GaryOkie opened this issue Feb 16, 2020 · 6 comments

Comments

@GaryOkie
Copy link

"Check Config" would be a very useful shortcut link in the menu, just prior to "Restart HASS".

@danielperna84
Copy link
Owner

We once had that, but then the API at Home Assistant changed and it broke.

As there is a usable workaround by just having a Home Assistant tab open in a second tab, I don't see a big benefit. Especially considering that Home Assistants native capabilities to work with automations (and the configuration in general) gets better and better.

I'll tag this as help wanted in case anyone want's to contribute.

@GaryOkie
Copy link
Author

GaryOkie commented Feb 18, 2020

ok, thanks. I thought it seemed like an obviously useful feature to not have been already included with all the other very useful shortcuts.

@danielperna84
Copy link
Owner

The difference compared to the other shortcuts is, that this actually produces output that has to be evaluated and displayed. So this takes more effort to implement.

@GaryOkie
Copy link
Author

The "execute shell command" (href=#modal_exec_command) already provides a nice way to display responses from the executed command. I tried to run hassio homeassistant check as a shell command but it isn't found in the configurator docker.

If there was a way to run hassio via this tool, then perhaps this would be a relatively easy way to integrate the config check into the configurator menu as a 1-step click (eg: #modal_exec_hassiocheck)

@danielperna84
Copy link
Owner

Yes, it just requires an additional modal and some logic that fetches the response and displays it nicely. Back then the homeassistant.check_config service could be used for this. It won't be possible to use the command since in case of Docker or the hasssio-addon Home Assistant would live outside of the container. So the only way to do this is by using the API calls like I'm doing it for reloading configs currently. In fact, the API is the only way the configurator should talk to Home Assistant (apart from reading the files from the filesystem).

@GaryOkie
Copy link
Author

completely understood. Thanks for the explanation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants