PHTV: let users delete default attributes after first define
git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@8121 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -1297,14 +1297,11 @@ sub PHTV_Define($$) {
|
|||||||
$hash->{swversion} = $hash->{READINGS}{softwareversion}{VAL}
|
$hash->{swversion} = $hash->{READINGS}{softwareversion}{VAL}
|
||||||
if ( defined( $hash->{READINGS}{softwareversion}{VAL} ) );
|
if ( defined( $hash->{READINGS}{softwareversion}{VAL} ) );
|
||||||
|
|
||||||
unless ( defined( AttrVal( $name, "webCmd", undef ) ) ) {
|
# set default settings on first define
|
||||||
|
if ($init_done) {
|
||||||
$attr{$name}{webCmd} = 'volume:input:rgb';
|
$attr{$name}{webCmd} = 'volume:input:rgb';
|
||||||
}
|
|
||||||
unless ( defined( AttrVal( $name, "devStateIcon", undef ) ) ) {
|
|
||||||
$attr{$name}{devStateIcon} =
|
$attr{$name}{devStateIcon} =
|
||||||
'on:rc_GREEN:off off:rc_YELLOW:on absent:rc_STOP:on';
|
'on:rc_GREEN:off off:rc_YELLOW:on absent:rc_STOP:on';
|
||||||
}
|
|
||||||
unless ( defined( AttrVal( $name, "icon", undef ) ) ) {
|
|
||||||
$attr{$name}{icon} = 'it_television';
|
$attr{$name}{icon} = 'it_television';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user