Add config option to use zigpy-ota beta channel
#617
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WIP - see "questions" at the bottom
Proposed change
This adds an
OTAConfigurationdataclass to allow Home Assistant Core to provide a config option that enables beta updates for the zigpy-ota provider.ZHA passes this option to zigpy by adding another zigpy-ota provider with the
betachannel andoverride_previousoptions set (to remove the defaultstableOTA provider added in zigpy).If any zigpy-ota provider is specified in YAML config, that takes precedence and this code doesn't add the overriding beta channel OTA provider.
Additional information
To show this option in Home Assistant Core, some changes will be needed there: home-assistant/core@dev...TheJulianJES:core:tjj/zha_zigpy_ota_beta_channel_config
There's also a
devzigpy-ota provider channel that's updated with new images, as soon as a new update/PR is merged, but I don't want to expose that in the UI. It can still be enabled via HA's YAMLconfiguration.yaml, as described here.Questions
I've only added a
use_beta_channelflag toOTAConfiguration. If we make this an enum/str with channels, we could have ZHA pass through more options for zigpy-ota. If we do that, we could always override the default zigpy-ota provider enabled in zigpy. But since we wouldn't allow enablingdevchannel support via the ZHA UI, we'd still have to check fordevextra_providersto allow that via YAML. Or should we disable the zigpy-ota provider by default in zigpy and only enable it through ZHA here?Not sure if I'm fully happy with this, yet..