From e1340d22c2c04e5832277008072b8307bcb51c27 Mon Sep 17 00:00:00 2001 From: jpawlowski Date: Sun, 1 Mar 2015 13:20:28 +0000 Subject: [PATCH] ONKYO_AVR: let users delete default attributes after first define git-svn-id: https://svn.fhem.de/fhem/trunk@8120 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/70_ONKYO_AVR.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fhem/FHEM/70_ONKYO_AVR.pm b/fhem/FHEM/70_ONKYO_AVR.pm index 480ccde64..8fc46b32a 100755 --- a/fhem/FHEM/70_ONKYO_AVR.pm +++ b/fhem/FHEM/70_ONKYO_AVR.pm @@ -1141,11 +1141,9 @@ sub ONKYO_AVR_Define($$) { return "Invalid zone, choose one of main zone2 zone3 zone4 dock"; } - # set default attributes - unless ( exists( $attr{$name}{webCmd} ) ) { + # set default settings on first define + if ($init_done) { $attr{$name}{webCmd} = 'volume:mute:input'; - } - unless ( exists( $attr{$name}{devStateIcon} ) ) { $attr{$name}{devStateIcon} = 'on:rc_GREEN:off off:rc_STOP:on absent:rc_RED'; }