Conversation
The switch→valve conversion registered services like enable_rain_delay, disable_rain_delay, set_manual_preset_runtime and start_program in the valve platform but never ported the corresponding methods onto BHyveZoneValve, so calling them with a valve entity errored out with "Service not implemented". The service handler also only looked up entities in the valve domain, breaking start_program on program switches. - Move websocket payload construction for rain delay and manual preset runtime onto BHyveClient, where the wire protocol belongs. - Give BHyveZoneValve thin service wrappers that delegate to the client. - Route the valve service handler through both VALVE_DOMAIN and SWITCH_DOMAIN so program switches can handle start_program, and surface unsupported (entity, service) pairs instead of aborting the whole loop. - Collapse BHyveRainDelaySwitch turn on/off onto the shared client methods.
- services.yaml: quote the update_program.frequency description so the unescaped colon after "known values" no longer breaks YAML parsing. - __init__.py: add CONFIG_SCHEMA = cv.config_entry_only_config_schema so hassfest's CONFIG_SCHEMA check passes now that async_setup exists without an inline schema.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
bhyve.enable_rain_delay,disable_rain_delay,set_manual_preset_runtimeandstart_programwere broken after the switch→valve conversion — the services were registered but the corresponding methods never got ported ontoBHyveZoneValve, and the handler only searched the valve domain for target entities.BHyveClient, givesBHyveZoneValvethin service wrappers that delegate to the client, and routes the service handler through both the valve and switch domains sostart_programfinds program switches.BHyveRainDelaySwitch.async_turn_on/offnow call the same client methods, removing the duplicated_set_rain_delayimplementation.