public async Task CallServiceAsync(string domain, string service, IDictionary <string, object> serviceData = null, CancellationToken cancellationToken = default) { var callServiceCommand = new CallServiceCommand(domain, service, serviceData); var callServiceCommandResult = await ConnectionService.SendCommandAsync <CallServiceCommand, CallServiceCommandResult>(callServiceCommand, cancellationToken); callServiceCommandResult.EnsureSuccessResult(); }
public AsyncContextOperation Send(CallServiceCommand command) => Send(command as HomeAssistantCommand);