async def test_open_cover(hass: core.HomeAssistant): """Tests that open 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_open, patch_bond_device_state(): await hass.services.async_call( COVER_DOMAIN, SERVICE_OPEN_COVER, {ATTR_ENTITY_ID: "cover.name_1"}, blocking=True, ) await hass.async_block_till_done() mock_open.assert_called_once_with("test-device-id", Action.open())
async def async_open_cover(self, **kwargs: Any) -> None: """Open the cover.""" await self._hub.bond.action(self._device.device_id, Action.open())