File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
custom_components/aguaiot Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 77from homeassistant .const import CONF_EMAIL , CONF_PASSWORD
88from homeassistant .core import HomeAssistant
99
10- from .const import DOMAIN
1110
1211TO_REDACT = {
1312 CONF_PASSWORD ,
1615
1716
1817async def async_get_config_entry_diagnostics (
19- hass : HomeAssistant , entry : ConfigEntry
18+ hass : HomeAssistant , config_entry : ConfigEntry
2019) -> dict [str , Any ]:
2120 """Return diagnostics for a config entry."""
22- agua = hass .data [DOMAIN ][entry .entry_id ]["agua" ]
21+ coordinator = config_entry .runtime_data
22+ agua = coordinator .agua
2323
2424 devices = {}
2525 for device in agua .devices :
@@ -28,6 +28,6 @@ async def async_get_config_entry_diagnostics(
2828 devices [device .name ][reg ] = device .get_register (reg )
2929
3030 return {
31- "entry" : async_redact_data (entry .as_dict (), TO_REDACT ),
31+ "entry" : async_redact_data (config_entry .as_dict (), TO_REDACT ),
3232 "devices" : devices ,
3333 }
You can’t perform that action at this time.
0 commit comments