refactor: discover entities at connect; delete appliance descriptor files
PushBridge no longer takes a descriptor at construction time. Instead it discovers entities from the live device cache immediately after the seed (via registry.discover + build_runtime_descriptor), publishes HA discovery payloads, wires on_observation, and builds command handlers — all in the new idempotent _discover_and_publish(sess) method called from _run_session_inner. Changes: - bridge.py: remove descriptor param; self.descriptor=None until first connect; SEED_PATH constant replaces self.descriptor.seed_path; all self.descriptor accesses guarded or moved post-discovery; inlined _bridge_diagnostic_discovery (was in appliances/base.py); subscribe to observe paths now happens after discovery (seed → discover → subscribe). - config.py: klass is now optional (defaults to ''); topic_prefix/name defaults handle empty klass. - main.py: drop get_descriptor import and pairs loop; build bridges as PushBridge(shared, app, cli); on_connect no longer publishes discovery_payloads (bridge self-publishes at discovery time). - Delete samsung_appliance/appliances/ entirely (6 files, ~2600 lines).
This commit is contained in:
1 parent
35222e6be5
commit
cd146ed2f0
10 files changed
+191
-2678
No files matched your search
@@ -1,5 +1,5 @@
|
||||
"""Samsung appliance local-API → MQTT bridge with HA discovery.
|
||||
|
||||
Multi-device: dryer, oven, etc. The device class is selected at startup
|
||||
via the DEVICE_CLASS env var (see samsung_appliance.appliances)."""
|
||||
Multi-device: dryer, oven, etc. Entities are discovered at connect-time
|
||||
from the live device resources via samsung_appliance.registry."""
|
||||
__version__ = "2.0.0"
|
||||
Reference in new issue
Block a user