Update dump_devinfo for raw discovery json and common redactors (#1358)
Some checks failed
CI / Perform linting checks (3.13) (push) Waiting to run
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.13) (push) Blocked by required conditions
CodeQL checks / Analyze (python) (push) Has been cancelled

This PR does a few related things to dump_devinfo:

- Store the raw discovery result in the fixture.
- Consolidate redaction logic so it's not duplicated in dump_devinfo.
- Update existing fixtures to:
  - Store raw discovery result under `result`
  - Use `SCRUBBED_CHILD_DEVICE_ID` everywhere
  - Have correct values as per the consolidated redactors.
This commit is contained in:
Steven B.
2024-12-11 13:18:44 +00:00
committed by GitHub
parent 032cd5d2cc
commit 8cb5c2e180
140 changed files with 1771 additions and 1407 deletions

View File

@@ -22,12 +22,12 @@
},
"system": {
"get_sysinfo": {
"alias": "TP-LINK_Power Strip_DAE1",
"alias": "#MASKED_NAME#",
"child_num": 6,
"children": [
{
"alias": "Office Monitor 1",
"id": "00",
"alias": "#MASKED_NAME# 1",
"id": "SCRUBBED_CHILD_DEVICE_ID_1",
"next_action": {
"type": -1
},
@@ -35,8 +35,8 @@
"state": 0
},
{
"alias": "Office Monitor 2",
"id": "01",
"alias": "#MASKED_NAME# 2",
"id": "SCRUBBED_CHILD_DEVICE_ID_2",
"next_action": {
"type": -1
},
@@ -44,8 +44,8 @@
"state": 0
},
{
"alias": "Office Monitor 3",
"id": "02",
"alias": "#MASKED_NAME# 3",
"id": "SCRUBBED_CHILD_DEVICE_ID_3",
"next_action": {
"type": -1
},
@@ -53,8 +53,8 @@
"state": 0
},
{
"alias": "Office Laptop Dock",
"id": "03",
"alias": "#MASKED_NAME# 4",
"id": "SCRUBBED_CHILD_DEVICE_ID_4",
"next_action": {
"type": -1
},
@@ -62,8 +62,8 @@
"state": 0
},
{
"alias": "Office Desk Light",
"id": "04",
"alias": "#MASKED_NAME# 5",
"id": "SCRUBBED_CHILD_DEVICE_ID_5",
"next_action": {
"type": -1
},
@@ -71,8 +71,8 @@
"state": 0
},
{
"alias": "Laptop",
"id": "05",
"alias": "#MASKED_NAME# 6",
"id": "SCRUBBED_CHILD_DEVICE_ID_6",
"next_action": {
"type": -1
},
@@ -87,7 +87,7 @@
"hw_ver": "1.0",
"latitude_i": 0,
"led_off": 0,
"longitude_i": -0,
"longitude_i": 0,
"mac": "00:00:00:00:00:00",
"mic_type": "IOT.SMARTPLUGSWITCH",
"model": "HS300(US)",