Update LG webOS TV diagnostics to use tv_info and tv_state dictionaries (#139189)

This commit is contained in:
Shay Levy 2025-02-24 17:11:07 +02:00 committed by GitHub
parent 51a881f3b5
commit 377da5f954
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 66 additions and 46 deletions

View File

@ -32,15 +32,8 @@ async def async_get_config_entry_diagnostics(
client_data = {
"is_registered": client.is_registered(),
"is_connected": client.is_connected(),
"current_app_id": client.tv_state.current_app_id,
"current_channel": client.tv_state.current_channel,
"apps": client.tv_state.apps,
"inputs": client.tv_state.inputs,
"system_info": client.tv_info.system,
"software_info": client.tv_info.software,
"hello_info": client.tv_info.hello,
"sound_output": client.tv_state.sound_output,
"is_on": client.tv_state.is_on,
"tv_info": client.tv_info.__dict__,
"tv_state": client.tv_state.__dict__,
}
return async_redact_data(

View File

@ -2,46 +2,73 @@
# name: test_diagnostics
dict({
'client': dict({
'apps': dict({
'com.webos.app.livetv': dict({
'icon': '**REDACTED**',
'id': 'com.webos.app.livetv',
'largeIcon': '**REDACTED**',
'title': 'Live TV',
}),
}),
'current_app_id': 'com.webos.app.livetv',
'current_channel': dict({
'channelId': 'ch1id',
'channelName': 'Channel 1',
'channelNumber': '1',
}),
'hello_info': dict({
'deviceUUID': '**REDACTED**',
}),
'inputs': dict({
'in1': dict({
'appId': 'app0',
'id': 'in1',
'label': 'Input01',
}),
'in2': dict({
'appId': 'app1',
'id': 'in2',
'label': 'Input02',
}),
}),
'is_connected': True,
'is_on': True,
'is_registered': True,
'software_info': dict({
'major_ver': 'major',
'minor_ver': 'minor',
'tv_info': dict({
'hello': dict({
'deviceUUID': '**REDACTED**',
}),
'software': dict({
'major_ver': 'major',
'minor_ver': 'minor',
}),
'system': dict({
'modelName': 'MODEL',
'serialNumber': '1234567890',
}),
}),
'sound_output': 'speaker',
'system_info': dict({
'modelName': 'MODEL',
'serialNumber': '1234567890',
'tv_state': dict({
'apps': dict({
'com.webos.app.livetv': dict({
'icon': '**REDACTED**',
'id': 'com.webos.app.livetv',
'largeIcon': '**REDACTED**',
'title': 'Live TV',
}),
}),
'channel_info': None,
'channels': list([
dict({
'channelId': 'ch1id',
'channelName': 'Channel 1',
'channelNumber': '1',
}),
dict({
'channelId': 'ch2id',
'channelName': 'Channel Name 2',
'channelNumber': '20',
}),
]),
'current_app_id': 'com.webos.app.livetv',
'current_channel': dict({
'channelId': 'ch1id',
'channelName': 'Channel 1',
'channelNumber': '1',
}),
'inputs': dict({
'in1': dict({
'appId': 'app0',
'id': 'in1',
'label': 'Input01',
}),
'in2': dict({
'appId': 'app1',
'id': 'in2',
'label': 'Input02',
}),
}),
'is_on': True,
'is_screen_on': False,
'media_state': list([
dict({
'playState': '',
}),
]),
'muted': False,
'power_state': dict({
}),
'sound_output': 'speaker',
'volume': 37,
}),
}),
'entry': dict({