diff --git a/fhem/FHEM/70_ONKYO_AVR.pm b/fhem/FHEM/70_ONKYO_AVR.pm index c2b7f82ab..5f5a7302e 100644 --- a/fhem/FHEM/70_ONKYO_AVR.pm +++ b/fhem/FHEM/70_ONKYO_AVR.pm @@ -35,6 +35,7 @@ sub ONKYO_AVR_Initialize($) { do_not_notify:1,0 disabledForIntervals volumeSteps:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 + volumeMax:uzsu,slider,0,1,100 inputs disable:0,1 model @@ -1075,6 +1076,8 @@ sub ONKYO_AVR_Set($$$) { $return = "No argument given"; } else { + my $volm = AttrVal( $name, "volumeMax", 0 ); + @$a[2] = $volm if ( $volm && @$a[2] > $volm ); Log3 $name, 3, "ONKYO_AVR set $name " . @$a[1] . " " . @$a[2]; if ( $state eq "on" ) { @@ -3383,6 +3386,9 @@ sub ONKYO_AVR_RClayout() {
  • volumeSteps   -   When using set commands volumeUp or volumeDown, the volume will be increased or decreased by these steps. Defaults to 1.
  • +
  • + volumeMax   1...100   When set, any volume higher than this is going to be replaced by this value. +
  • wakeupCmd   -   In case the device is unreachable and one is sending set command "on", this FHEM command will be executed before the actual "on" command is sent. E.g. may be used to turn on a switch before the device becomes available via network.
  • diff --git a/fhem/FHEM/71_ONKYO_AVR_ZONE.pm b/fhem/FHEM/71_ONKYO_AVR_ZONE.pm index 003a7132c..4ecbbf918 100644 --- a/fhem/FHEM/71_ONKYO_AVR_ZONE.pm +++ b/fhem/FHEM/71_ONKYO_AVR_ZONE.pm @@ -25,7 +25,7 @@ sub ONKYO_AVR_ZONE_Initialize($) { $hash->{AttrList} = "IODev disable:0,1 disabledForIntervals do_not_notify:1,0 " - . "volumeSteps:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 inputs wakeupCmd:textField " + . "volumeSteps:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 volumeMax:uzsu,slider,0,1,100 inputs wakeupCmd:textField " . $readingFnAttributes; $data{RC_layout}{ONKYO_AVR_ZONE_SVG} = "ONKYO_AVR_ZONE_RClayout_SVG"; @@ -998,6 +998,8 @@ sub ONKYO_AVR_ZONE_Set($$$) { $return = "No argument given"; } else { + my $volm = AttrVal( $name, "volumeMax", 0 ); + @$a[2] = $volm if ( $volm && @$a[2] > $volm ); Log3 $name, 3, "ONKYO_AVR_ZONE set $name " . @$a[1] . " " . @$a[2]; if ( $state eq "on" ) { @@ -1721,6 +1723,9 @@ sub ONKYO_AVR_ZONE_RClayout() {
  • volumeSteps   -   When using set commands volumeUp or volumeDown, the volume will be increased or decreased by these steps. Defaults to 1.
  • +
  • + volumeMax   1...100   When set, any volume higher than this is going to be replaced by this value. +
  • wakeupCmd   -   In case the device is unreachable and one is sending set command "on", this FHEM command will be executed before the actual "on" command is sent. E.g. may be used to turn on a switch before the device becomes available via network.