diff --git a/fhem/CHANGED b/fhem/CHANGED index ae842a567..7df229d34 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,6 +1,7 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. - SVN + - feature: YAMAHA_AVR: new argument "toggle" for mute command - feature: FB_CALLMONITOR: replace & to & at reverse search - feature: new module 33_readingsProxy to make (a subset of) a reading from one device available as a new device. can be used to diff --git a/fhem/FHEM/71_YAMAHA_AVR.pm b/fhem/FHEM/71_YAMAHA_AVR.pm index a367d5216..13504e281 100755 --- a/fhem/FHEM/71_YAMAHA_AVR.pm +++ b/fhem/FHEM/71_YAMAHA_AVR.pm @@ -226,7 +226,7 @@ YAMAHA_AVR_Set($@) return "No Argument given" if(!defined($a[1])); my $what = $a[1]; - my $usage = "Unknown argument $what, choose one of on:noArg off:noArg volumeStraight:slider,-80,1,16 volume:slider,0,1,100 volumeUp volumeDown input:".$inputs_comma." mute:on,off remoteControl:setup,up,down,left,right,return,option,display,tunerPresetUp,tunerPresetDown,enter ".(defined($hash->{helper}{SCENES})?"scene:".$scenes_comma." ":"")."statusRequest:noArg"; + my $usage = "Unknown argument $what, choose one of on:noArg off:noArg volumeStraight:slider,-80,1,16 volume:slider,0,1,100 volumeUp volumeDown input:".$inputs_comma." mute:on,off,toggle remoteControl:setup,up,down,left,right,return,option,display,tunerPresetUp,tunerPresetDown,enter ".(defined($hash->{helper}{SCENES})?"scene:".$scenes_comma." ":"")."statusRequest:noArg"; # Depending on the status response, use the short or long Volume command @@ -365,6 +365,17 @@ YAMAHA_AVR_Set($@) { $result = YAMAHA_AVR_SendCommand($hash, "<$zone><$volume_cmd>Off"); } + elsif($a[2] eq "toggle") + { + if(ReadingsVal($hash->{NAME}, "mute", "off") eq "on") + { + $result = YAMAHA_AVR_SendCommand($hash, "<$zone><$volume_cmd>Off"); + } + else + { + $result = YAMAHA_AVR_SendCommand($hash, "<$zone><$volume_cmd>On"); + } + } else { return $usage; @@ -1006,7 +1017,7 @@ sub YAMAHA_AVR_getInputs($)
  • volumeStraight -80...15   -   set the volume level in decibel
  • volumeUp [0-100]   -   increases the volume level by 5% or the value of attribute volumeSteps (optional the increasing level can be given as argument, which will be used instead)
  • volumeDown [0-100]   -   decreases the volume level by 5% or the value of attribute volumeSteps (optional the decreasing level can be given as argument, which will be used instead)
  • -
  • mute on|off   -   activates volume mute
  • +
  • mute on|off|toggle   -   activates volume mute
  • statusRequest   -   requests the current status of the device
  • remoteControl up,down,...   -   sends remote control commands as listed below
  • @@ -1203,7 +1214,7 @@ output # only available in zones other than mainzone

  • volumeStraight -87...15   -   Setzt die Lautstärke in Dezibel (-80.5 bis 15.5 dB) so wie sie am Receiver auch verwendet wird.
  • volumeUp [0...100]   -   Erhöht die Lautstärke um 5% oder entsprechend dem Attribut volumeSteps (optional kann der Wert auch als Argument angehangen werden, dieser hat dann Vorang)
  • volumeDown [0...100]   -   Veringert die Lautstärke um 5% oder entsprechend dem Attribut volumeSteps (optional kann der Wert auch als Argument angehangen werden, dieser hat dann Vorang)
  • -
  • mute on|off   -   Schaltet den Receiver stumm
  • +
  • mute on|off|toggle   -   Schaltet den Receiver stumm
  • statusRequest   -   Fragt den aktuell Status des Receivers ab
  • remoteControl up,down,...   -   Sendet Fernbedienungsbefehle wie im nächsten Abschnitt beschrieben