Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions homeassistant/components/webostv/diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
99 changes: 63 additions & 36 deletions tests/components/webostv/snapshots/test_diagnostics.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -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',
'is_connected': True,
'is_registered': True,
'tv_info': dict({
'hello': dict({
'deviceUUID': '**REDACTED**',
}),
}),
'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',
'software': dict({
'major_ver': 'major',
'minor_ver': 'minor',
}),
'in2': dict({
'appId': 'app1',
'id': 'in2',
'label': 'Input02',
'system': dict({
'modelName': 'MODEL',
'serialNumber': '1234567890',
}),
}),
'is_connected': True,
'is_on': True,
'is_registered': True,
'software_info': dict({
'major_ver': 'major',
'minor_ver': 'minor',
}),
'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({
Expand Down