Esempio n. 1
0
        public async Task <Result> VolumeDown()
        {
            var sb          = new StringBuilder();
            var powerStatus = await _yamahaService.PowerStatus();

            if (powerStatus == PowerStatusEnum.On)
            {
                var newVolume = await _yamahaService.VolumeDown();

                sb.AppendLine("Yamaha Volume Down.");

                VolumeChangeNotify(newVolume);
                sb.Append($"{newVolume} db");
            }
            else
            {
                sb.AppendLine("Yamaha is turned off.");
                PushNotification("Yamaha is turned off. Operation canceled");
            }

            return(new Result()
            {
                ErrorCode = 0,
                Message = sb.ToString(),
                Ok = true
            });
        }
Esempio n. 2
0
 public async Task <int> VolumeDown()
 {
     return(await YamahaService.VolumeDown());
 }