Use entry.as_dict() in OpenUV diagnostics (#80115)

This commit is contained in:
Aaron Bach 2022-10-11 10:17:03 -06:00 committed by GitHub
parent 020b7e9762
commit 4ea46bf841
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 15 deletions

View file

@ -12,18 +12,30 @@ async def test_entry_diagnostics(hass, config_entry, hass_client, setup_openuv):
)
assert await get_diagnostics_for_config_entry(hass, hass_client, config_entry) == {
"entry": {
"entry_id": config_entry.entry_id,
"version": 2,
"domain": "openuv",
"title": REDACTED,
"data": {
"api_key": REDACTED,
"elevation": 0,
"latitude": REDACTED,
"longitude": REDACTED,
},
"options": {
"from_window": 3.5,
"to_window": 3.5,
},
"options": {"from_window": 3.5, "to_window": 3.5},
"pref_disable_new_entities": False,
"pref_disable_polling": False,
"source": "user",
"unique_id": REDACTED,
"disabled_by": None,
},
"data": {
"protection_window": {
"from_time": "2018-07-30T15:17:49.750Z",
"from_uv": 3.2509,
"to_time": "2018-07-30T22:47:49.750Z",
"to_uv": 3.6483,
},
"uv": {
"uv": 8.2342,
"uv_time": "2018-07-30T20:53:06.302Z",
@ -62,11 +74,5 @@ async def test_entry_diagnostics(hass, config_entry, hass_client, setup_openuv):
},
},
},
"protection_window": {
"from_time": "2018-07-30T15:17:49.750Z",
"from_uv": 3.2509,
"to_time": "2018-07-30T22:47:49.750Z",
"to_uv": 3.6483,
},
},
}