mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +00:00
Add bluetooth connection availability to diagnostics for lamarzocco (#144012)
* Add bluetooth connection availability to diagnostics for lamarzocco * make even more detailed
This commit is contained in:
parent
06bb692522
commit
e2679004a1
@ -5,8 +5,10 @@ from __future__ import annotations
|
|||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from homeassistant.components.diagnostics import async_redact_data
|
from homeassistant.components.diagnostics import async_redact_data
|
||||||
|
from homeassistant.const import CONF_MAC, CONF_TOKEN
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
||||||
|
from .const import CONF_USE_BLUETOOTH
|
||||||
from .coordinator import LaMarzoccoConfigEntry
|
from .coordinator import LaMarzoccoConfigEntry
|
||||||
|
|
||||||
TO_REDACT = {
|
TO_REDACT = {
|
||||||
@ -21,4 +23,12 @@ async def async_get_config_entry_diagnostics(
|
|||||||
"""Return diagnostics for a config entry."""
|
"""Return diagnostics for a config entry."""
|
||||||
coordinator = entry.runtime_data.config_coordinator
|
coordinator = entry.runtime_data.config_coordinator
|
||||||
device = coordinator.device
|
device = coordinator.device
|
||||||
return async_redact_data(device.to_dict(), TO_REDACT)
|
data = {
|
||||||
|
"device": device.to_dict(),
|
||||||
|
"bluetooth_available": {
|
||||||
|
"options_enabled": entry.options.get(CONF_USE_BLUETOOTH, True),
|
||||||
|
CONF_MAC: CONF_MAC in entry.data,
|
||||||
|
CONF_TOKEN: CONF_TOKEN in entry.data,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
return async_redact_data(data, TO_REDACT)
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user