Fix wake up in Tesla Fleet (#127615)

pull/127631/head
Brett Adams 2024-10-05 20:04:10 +10:00 committed by GitHub
parent 59ebb94d24
commit 213cc14494
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 2 deletions

View File

@ -20,8 +20,9 @@ from .models import TeslaFleetVehicleData
PARALLEL_UPDATES = 0
async def do_nothing() -> None:
"""Do nothing."""
async def do_nothing() -> dict[str, dict[str, bool]]:
"""Do nothing with a positive result."""
return {"response": {"result": True}}
@dataclass(frozen=True, kw_only=True)

View File

@ -28,6 +28,13 @@ async def test_button(
await setup_platform(hass, normal_config_entry, [Platform.BUTTON])
assert_entities(hass, normal_config_entry.entry_id, entity_registry, snapshot)
await hass.services.async_call(
BUTTON_DOMAIN,
SERVICE_PRESS,
{ATTR_ENTITY_ID: ["button.test_wake"]},
blocking=True,
)
@pytest.mark.parametrize(
("name", "func"),