diff --git a/homeassistant/components/tesla_fleet/button.py b/homeassistant/components/tesla_fleet/button.py index 548bf065397..87cd95576d2 100644 --- a/homeassistant/components/tesla_fleet/button.py +++ b/homeassistant/components/tesla_fleet/button.py @@ -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) diff --git a/tests/components/tesla_fleet/test_button.py b/tests/components/tesla_fleet/test_button.py index 8b83011e6f4..addba00b93d 100644 --- a/tests/components/tesla_fleet/test_button.py +++ b/tests/components/tesla_fleet/test_button.py @@ -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"),