2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 03:06:37 +00:00

PHTV: let users delete default attributes after first define

git-svn-id: https://svn.fhem.de/fhem/trunk@8121 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jpawlowski 2015-03-01 13:20:30 +00:00
parent e1340d22c2
commit de99ae42d8

View File

@ -1297,14 +1297,11 @@ sub PHTV_Define($$) {
$hash->{swversion} = $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';
}
unless ( defined( AttrVal( $name, "devStateIcon", undef ) ) ) {
$attr{$name}{devStateIcon} =
'on:rc_GREEN:off off:rc_YELLOW:on absent:rc_STOP:on';
}
unless ( defined( AttrVal( $name, "icon", undef ) ) ) {
$attr{$name}{icon} = 'it_television';
}