async def test_close_cover(hass: core.HomeAssistant): """Tests that close cover command delegates to API.""" await setup_platform(hass, COVER_DOMAIN, shades("name-1"), bond_device_id="test-device-id") with patch_bond_action() as mock_close, patch_bond_device_state(): await hass.services.async_call( COVER_DOMAIN, SERVICE_CLOSE_COVER, {ATTR_ENTITY_ID: "cover.name_1"}, blocking=True, ) await hass.async_block_till_done() mock_close.assert_called_once_with("test-device-id", Action.close())
async def async_close_cover(self, **kwargs: Any) -> None: """Close cover.""" await self._hub.bond.action(self._device.device_id, Action.close())