feat(satellite): prioritize service-specific configuration files#442
feat(satellite): prioritize service-specific configuration files#442Bluscream wants to merge 2 commits into
Conversation
…avoids a NullReferenceException when the Satellite Service encounters unsupported entity types (e.g. WebViewCommand, Bluetooth sensors) that aren't available in the headless service context.
…ite Service will now try to load 'servicecommands.json' and 'servicesensors.json' before falling back to the standard 'commands.json' and 'sensors.json' files. This allows for service-specific configurations without affecting the global HASS.Agent UI-managed configs.
|
Hmm, the satellite service already has it's own configuration files in the "programfiles/config" directory i.e. separate from the client's configuration. |
|
i symlink the two config dirs together because its more tidy and gives me a single source/target for backups without having to untangle the configs (ended up with satellite sensors in my agent and vice versa more than once) also when sharing configs (or backing up) makes it just so much easier to know whats what without having to open the files and guess based on content |
|
Hmm, this is definitely not a standard use-case scenario :D We need to make it more verbose and direct to the user that this kind of "override" happens tho. I'll drop a few review comments in the next days if you don't mind. Once the changes are implemented I'll merge the PR.
|
This PR introduces support for service-specific configuration files (servicecommands.json and servicesensors.json) in the Satellite Service. If these files exist in the config directory, the service will prioritize them over the standard global configuration files. This allows for dedicated service configurations without impacting the main HASS.Agent UI-managed entities.
Additionally, this PR includes the NullReferenceException fixes for unknown entity types (previously submitted in #441), ensuring the service remains stable when skipping unsupported entities.