mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-25 22:15:09 +00:00
76_SolarForecast: contrib 1.17.0
git-svn-id: https://svn.fhem.de/fhem/trunk@28704 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5a961dfcb4
commit
f9c0e84035
@ -5427,15 +5427,20 @@ sub _attrWeatherDev { ## no critic "not used"
|
|||||||
my $hash = $paref->{hash};
|
my $hash = $paref->{hash};
|
||||||
my $name = $paref->{name};
|
my $name = $paref->{name};
|
||||||
my $aVal = $paref->{aVal} // return qq{no weather forecast device specified} if($paref->{cmd} eq 'set');
|
my $aVal = $paref->{aVal} // return qq{no weather forecast device specified} if($paref->{cmd} eq 'set');
|
||||||
|
my $aName = $paref->{aName};
|
||||||
|
|
||||||
return if(!$init_done);
|
return if(!$init_done);
|
||||||
|
|
||||||
if ($paref->{cmd} eq 'set' ) {
|
if ($paref->{cmd} eq 'set' ) {
|
||||||
if ($aVal ne 'OpenMeteoDWD-API' && (!$defs{$aVal} || $defs{$aVal}{TYPE} ne "DWD_OpenData")) {
|
if ($aVal ne 'OpenMeteoDWD-API' && (!$defs{$aVal} || $defs{$aVal}{TYPE} ne "DWD_OpenData")) {
|
||||||
return qq{The device "$aVal" doesn't exist or has no TYPE "DWD_OpenData"};
|
return qq{The device "$aVal" doesn't exist or has no TYPE 'DWD_OpenData'};
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($aVal eq 'OpenMeteoDWD-API') {
|
if ($aVal eq 'OpenMeteoDWD-API') {
|
||||||
|
if ($aName ne 'ctrlWeatherDev1') {
|
||||||
|
return qq{Only the leading attribute 'ctrlWeatherDev1' can set to 'OpenMeteoDWD-API'};
|
||||||
|
}
|
||||||
|
|
||||||
CommandSet (undef,"$name currentRadiationAPI $aVal"); # automatisch currentRadiationAPI setzen
|
CommandSet (undef,"$name currentRadiationAPI $aVal"); # automatisch currentRadiationAPI setzen
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user