feat: Einstellungen, Neustart, Diagnose-Sensoren und Diagnose-Download

This commit is contained in:
Michael Sauer
2026-09-16 16:08:47 +02:00
parent be0a8e21b6
commit cc318c9d25
13 changed files with 608 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
"""Reboot button."""
from __future__ import annotations
from unittest.mock import MagicMock
from homeassistant.components.button import DOMAIN as BUTTON_DOMAIN
from homeassistant.components.button import SERVICE_PRESS
from homeassistant.const import ATTR_ENTITY_ID
from homeassistant.core import HomeAssistant
from tests.helpers import entity_id_for
async def test_press_reboots(hass: HomeAssistant, init_integration, mock_client: MagicMock) -> None:
entity_id = entity_id_for(hass, "button", "reboot")
assert hass.states.get(entity_id).attributes["device_class"] == "restart"
await hass.services.async_call(
BUTTON_DOMAIN, SERVICE_PRESS, {ATTR_ENTITY_ID: entity_id}, blocking=True
)
mock_client.reboot.assert_awaited_once_with()