feat: integrate learned peripherals into mode creation
Expose safe NFC-bound infrared actions to semantic scene composition, require flashing-light actions for romantic and Mid-Autumn modes, and preserve mixed CAN/IR mode flows. Fix NFC device reassignment and retry extension/toy MQTT publication when an active card's binding catalog changes.
This commit is contained in:
@@ -21,6 +21,11 @@ def test_unified_console_exposes_device_id_based_nfc_authorization() -> None:
|
||||
assert '<h2>NFC 设备授权</h2>' in script
|
||||
assert 'NFC 设备授权' in script
|
||||
assert 'api("nfc/status")' in script
|
||||
assert 'function applyExtensionToySnapshot(value' in script
|
||||
assert 'value.extension_toy' in script
|
||||
assert 'topic: "extension/toy"' in script
|
||||
assert '发送失败:${extensionToySnapshot.last_error' in script
|
||||
assert 'burst_published_count' in script
|
||||
assert 'function bindCardToDevice(device, cardUid)' in script
|
||||
assert 'function infraredDeviceGroups()' in script
|
||||
assert 'function configuredCapabilities(deviceId = null)' in script
|
||||
@@ -28,6 +33,10 @@ def test_unified_console_exposes_device_id_based_nfc_authorization() -> None:
|
||||
assert 'data-nfc-capability-enabled' in script
|
||||
assert 'data-nfc-select-all' in script
|
||||
assert '全部命令已默认选中' in script
|
||||
assert 'class="v2-nfc-existing v2-nfc-rebind"' in script
|
||||
assert '将当前 NFC 改绑到新设备 ID' in script
|
||||
assert '改绑设备 ID' in script
|
||||
assert '旧设备 ID 的 NFC 授权会解除' in script
|
||||
assert 'function createToyFromNfc()' not in script
|
||||
assert 'data-nfc-learn-capability' not in script
|
||||
assert 'data-nfc-relearn-capability' not in script
|
||||
@@ -38,6 +47,7 @@ def test_unified_console_exposes_device_id_based_nfc_authorization() -> None:
|
||||
assert 'value.legacy_profiles' in script
|
||||
assert 'value.legacy_bridge_addresses' in script
|
||||
assert 'device.cardUid = normalizedUid' in script
|
||||
assert 'item.cardUid = null' in script
|
||||
assert 'const targetSlot = relearning ? Number(capability.slot) : allocateSlot()' in script
|
||||
assert 'sendGatewayCommand("read", { slot: learning.draft.slot })' in script
|
||||
assert 'function infraredSignalFromResponse(value)' in script
|
||||
@@ -61,7 +71,7 @@ def test_unified_console_exposes_device_id_based_nfc_authorization() -> None:
|
||||
assert '.v2-nfc-command-list' in styles
|
||||
assert '.v2-nfc-command-option' in styles
|
||||
assert '.v2-nfc-select-all' in styles
|
||||
assert 'self-extension.js?v=pet-settings-53-performance' in html
|
||||
assert 'self-extension.js?v=nfc-mqtt-56' in html
|
||||
assert 'import "../self-extension.css";' in vite_entry
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user