mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-22 08:11:44 +00:00
FHEMWEB: support for model specific icons added
git-svn-id: https://svn.fhem.de/fhem/trunk@2008 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
3df668c750
commit
c227ba6522
@ -2210,6 +2210,8 @@ FW_dev2image($)
|
|||||||
my ($type, $state) = ($d->{TYPE}, $d->{STATE});
|
my ($type, $state) = ($d->{TYPE}, $d->{STATE});
|
||||||
return "" if(!$type || !defined($state));
|
return "" if(!$type || !defined($state));
|
||||||
|
|
||||||
|
my $model = $attr{$name}{model} if(defined($attr{$name}{model}));
|
||||||
|
|
||||||
my (undef, $rstate) = ReplaceEventMap($name, [undef, $state], 0);
|
my (undef, $rstate) = ReplaceEventMap($name, [undef, $state], 0);
|
||||||
$state =~ s/ .*//; # Want to be able to have icons for "on-for-timer xxx"
|
$state =~ s/ .*//; # Want to be able to have icons for "on-for-timer xxx"
|
||||||
|
|
||||||
@ -2217,6 +2219,8 @@ FW_dev2image($)
|
|||||||
$icon = FW_getIcon("$name.$state") if(!$icon); # lamp.Aus.png
|
$icon = FW_getIcon("$name.$state") if(!$icon); # lamp.Aus.png
|
||||||
$icon = FW_getIcon("$name.$rstate") if(!$icon); # lamp.on.png
|
$icon = FW_getIcon("$name.$rstate") if(!$icon); # lamp.on.png
|
||||||
$icon = FW_getIcon($name) if(!$icon); # lamp.png
|
$icon = FW_getIcon($name) if(!$icon); # lamp.png
|
||||||
|
$icon = FW_getIcon("$model.$state") if(!$icon && $model); # HM-OU-LED16.off.png
|
||||||
|
$icon = FW_getIcon($model) if(!$icon && $model); # HM-OU-LED16.png
|
||||||
$icon = FW_getIcon("$type.$state") if(!$icon); # FS20.Aus.png
|
$icon = FW_getIcon("$type.$state") if(!$icon); # FS20.Aus.png
|
||||||
$icon = FW_getIcon("$type.$rstate") if(!$icon); # FS20.on.png
|
$icon = FW_getIcon("$type.$rstate") if(!$icon); # FS20.on.png
|
||||||
$icon = FW_getIcon($type) if(!$icon); # FS20.png
|
$icon = FW_getIcon($type) if(!$icon); # FS20.png
|
||||||
|
Loading…
x
Reference in New Issue
Block a user