Merged
Conversation
These attribute/program constants were left over from when the zone switch lived in switch.py; they all now live in valve.py. Removing them also drops the now-unused timedelta import and DEFAULT_MANUAL_RUNTIME.
Audited remaining modules and dropped constants that no code references: - const: DEVICES, PROGRAMS, DATA_BHYVE, SIGNAL_UPDATE_DEVICE, SIGNAL_UPDATE_PROGRAM, TYPE_BINARY_SENSOR, TYPE_SENSOR - diagnostics: CONF_ALTITUDE, CONF_UUID - valve: PROGRAM_SMART_WATERING, PROGRAM_MANUAL
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
Audited every module in
custom_components/bhyve/for module-level constants with zero references anywhere in the codebase (including tests). Removed the dead ones.DEFAULT_MANUAL_RUNTIME,PROGRAM_SMART_WATERING,PROGRAM_MANUAL,ATTR_MANUAL_RUNTIME,ATTR_SMART_WATERING_ENABLED,ATTR_SPRINKLER_TYPE,ATTR_IMAGE_URL,ATTR_STARTED_WATERING_AT,ATTR_SMART_WATERING_PLAN,ATTR_CURRENT_STATION,ATTR_CURRENT_PROGRAM,ATTR_CURRENT_RUNTIME,ATTR_NEXT_START_TIME,ATTR_NEXT_START_PROGRAMS,ATTR_MINUTES,ATTR_HOURS,ATTR_PERCENTAGE,ATTR_PROGRAM, plus thetimedeltaimportDEVICES,PROGRAMS,DATA_BHYVE,SIGNAL_UPDATE_DEVICE,SIGNAL_UPDATE_PROGRAM,TYPE_BINARY_SENSOR,TYPE_SENSORCONF_ALTITUDE,CONF_UUIDPROGRAM_SMART_WATERING,PROGRAM_MANUALMost were left over from the zone switch → valve migration. No runtime behaviour changes.
Test plan
./scripts/test— 142 passed./scripts/lint— all checks passed