Skip to content

Commit c50f4d6

Browse files
authored
Add Tuya local_strategy to Tuya diagnostic (home-assistant#158450)
1 parent 6803609 commit c50f4d6

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

homeassistant/components/tuya/diagnostics.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ def _async_device_as_dict(
9898
"home_assistant": {},
9999
"set_up": device.set_up,
100100
"support_local": device.support_local,
101+
"local_strategy": device.local_strategy,
101102
"warnings": DEVICE_WARNINGS.get(device.id),
102103
}
103104

tests/components/tuya/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ async def _create_device(hass: HomeAssistant, mock_device_code: str) -> Customer
176176
if device.update_time:
177177
device.update_time = int(dt_util.as_timestamp(device.update_time))
178178
device.support_local = details.get("support_local")
179+
device.local_strategy = details.get("local_strategy")
179180
device.mqtt_connected = details.get("mqtt_connected")
180181

181182
device.function = {

tests/components/tuya/snapshots/test_diagnostics.ambr

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@
198198
'name_by_user': None,
199199
}),
200200
'id': '2pxfek1jjrtctiyglam',
201+
'local_strategy': None,
201202
'mqtt_connected': True,
202203
'name': 'Multifunction alarm',
203204
'online': True,
@@ -369,6 +370,7 @@
369370
'name_by_user': None,
370371
}),
371372
'id': 'cwwk68dyfsh2eqi4jbqr',
373+
'local_strategy': None,
372374
'mqtt_connected': True,
373375
'name': 'Gas sensor',
374376
'online': True,
@@ -512,6 +514,7 @@
512514
'name_by_user': None,
513515
}),
514516
'id': 'vrhdtr5fawoiyth9qdt',
517+
'local_strategy': None,
515518
'mqtt_connected': True,
516519
'name': 'Framboisiers',
517520
'online': True,
@@ -644,6 +647,7 @@
644647
'name_by_user': None,
645648
}),
646649
'id': 'cwwk68dyfsh2eqi4jbqr',
650+
'local_strategy': None,
647651
'name': 'Gas sensor',
648652
'online': True,
649653
'product_id': '4iqe2hsfyd86kwwc',

0 commit comments

Comments
 (0)