You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The switch.py file contains non-functional template code from the integration blueprint that was never removed or implemented:
Location:custom_components/riverlink/switch.py
classRiverLinkSwitch(RiverLinkEntity, SwitchEntity):
"""RiverLink Switch class."""defis_on(self) ->bool:
"""Return true if the switch is on."""returnself.coordinator.data.get("title", "") =="foo"asyncdefasync_turn_on(self, **kwargs: Any) ->None:
"""Turn on the switch."""awaitself.coordinator.api.async_set_title("bar")
asyncdefasync_turn_off(self, **kwargs: Any) ->None:
"""Turn off the switch."""awaitself.coordinator.api.async_set_title("foo")
Problems
References non-existent API methodasync_set_title()
Uses meaningless test values ("foo", "bar")
Switch platform is not loaded (not in PLATFORMS list in __init__.py)
Creates confusion for developers reading the code
No clear use case identified for this switch
Impact
Severity: Low (not loaded, doesn't affect users)
Developer Impact: Medium (confusing for contributors)
Problem
Two minor code quality issues need cleanup:
Both are low-impact but create confusion for developers and should be cleaned up.
Issue #4: Switch Platform Template Code
Current State
The
switch.pyfile contains non-functional template code from the integration blueprint that was never removed or implemented:Location:
custom_components/riverlink/switch.pyProblems
async_set_title()__init__.py)Impact
Resolution Options
Option 1 (Recommended): Delete the file
custom_components/riverlink/switch.pyentirelyOption 2: Implement properly
Option 3: Keep as placeholder
Recommendation: Option 1 - Delete the file. No use case has been identified, and it can easily be recreated if needed.
Issue #5: Configuration Logger Reference
Current State
The development configuration file references the wrong package name:
Location:
config/configuration.yamlShould Be
Impact
configuration.yamlis usedFix
Simple one-line change in
config/configuration.yaml:Combined Implementation
Both issues can be resolved together in a single PR:
Changes Required
custom_components/riverlink/switch.pyconfig/configuration.yamllogger referenceTesting
Effort
Benefits
References
OPEN_ISSUES.mdsection "Known Bugs" for detailed context