diff --git a/fhem/webfrontend/pgm2/01_FHEMWEB.pm b/fhem/webfrontend/pgm2/01_FHEMWEB.pm index 3960eb43a..e79f47a91 100755 --- a/fhem/webfrontend/pgm2/01_FHEMWEB.pm +++ b/fhem/webfrontend/pgm2/01_FHEMWEB.pm @@ -81,6 +81,7 @@ FHEMWEB_Initialize($) $hash->{DefFn} = "FHEMWEB_Define"; $hash->{UndefFn} = "FHEMWEB_Undef"; + $hash->{AttrFn} = "FHEMWEB_Attr"; $hash->{AttrList}= "loglevel:0,1,2,3,4,5,6 webname plotmode:gnuplot,gnuplot-scroll,SVG plotsize"; } @@ -126,6 +127,18 @@ FHEMWEB_Undef($$) return undef; } +##################################### +sub +FHEMWEB_Attr(@) +{ + my @a = @_; + + if($a[0] eq "set" && $a[2] eq "plotmode" && $a[3] eq "SVG" && + !$modules{SVG}{LOADED}) { + CommandReload(undef, "98_SVG"); + } +} + ##################################### sub FHEMWEB_Read($)