-
Notifications
You must be signed in to change notification settings - Fork 69
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
Lots of unnecessarily required config fields #262
Comments
When was this first time that you tried? There has been a lot of improvements for these types of issues thanks to the work of @GeoDerp earlier this year. There is now a treatment for setting default values when they are not specified by the user. |
Hey @werdnum, you probably have some good ideas, as @davidusb-geek already mentioned we have done some parameter defaulting in the add-on version of EMHASS. If you like, try running the I'll update this comment Tomorrow with more details on this (currently writing this on bed with 1% battery life). But for now have a look at https://emhass.readthedocs.io/en/latest/develop.html#docker-run-add-on-via-with-local-files for docker run command difference, and https://emhass.readthedocs.io/en/latest/differences.html for the parameter name differences between |
If you with to grab the image via a container registry: (not build the image locally)
|
I'm not sure I understand the difference between the 'addon' and the regular version of EMHASS. I thought addons were just for HAOS, and I'm not using HAOS, so I am just using the normal version. Is the addon version better supported or something? |
Thats correct, In saying this this is the first time trying out the container via DockerHub and I seem to be running into some issues (I know why , i'm just not sure whats the best outcome ). Having a look at it now. |
As a meta question, what's the point in having a separate standalone type if the add-on version doesn't actually require running under HAOS? Would it make sense to maintain only the add-on version, or at least to strongly encourage preferring it over the standalone one? |
I think the best way to use add-on mode is via passing in the arguments via the standalone mode Image
|
Good question. The one main difference is that add-on mode calls HA via its local API to gain location and timezone information. Since everyone is already using one or the other. This may be a good change to implement on a large version release. And it may be good to make sure legacy users are not impacted. |
Describe the bug
When I tried to start up EMHASS for the first time, I deleted all the parts of the configuration file that didn't apply (I have no solar and no battery). EMHASS refused to start up and/or do any optimisation until I added them all back.
This makes config migrations harder when you add new required options (as also happened later on)
To Reproduce
Run EMHASS with a configuration file that includes no parameters related to solar and batteries and try to do a forecast.
Expected behavior
EMHASS should ignore the absence of fields that are not relevant to the current configuration.
If EMHASS has required fields, it should throw a user friendly error on startup instead of KeyError on doing a forecast.
Screenshots
N/A
Home Assistant installation type
Container, but not relevant.
Your hardware
Linux Kubernetes arm64
EMHASS installation type
Container in Kubernetes
Additional context
Maybe worth using whatever HA uses for configuration validation?
The text was updated successfully, but these errors were encountered: