mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-05-02 03:22:40 +02:00
fix: invalidate self_info cache after set_param
get_device_info() cached SELF_INFO payload in _self_info and never refreshed it after set operations, so get always returned stale values. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2910,6 +2910,8 @@ class DeviceManager:
|
||||
"""Set a device parameter."""
|
||||
if not self.is_connected:
|
||||
return {'success': False, 'error': 'Device not connected'}
|
||||
# Invalidate cached self_info so next get_param reads fresh data
|
||||
self._self_info = None
|
||||
try:
|
||||
if param == 'name':
|
||||
self.execute(self.mc.commands.set_name(value), timeout=5)
|
||||
|
||||
Reference in New Issue
Block a user