mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 23:06:37 +00:00
99_SUNRISE_EL.pm: Log missing attribute (Forum #112281)
git-svn-id: https://svn.fhem.de/fhem/trunk@22216 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
24d99189cd
commit
2df50a0804
@ -3214,11 +3214,11 @@ FW_devState($$@)
|
|||||||
$txt = $v if(defined($v));
|
$txt = $v if(defined($v));
|
||||||
|
|
||||||
} elsif(!$dsi && $allSets =~ m/\bdesired-temp:/) {
|
} elsif(!$dsi && $allSets =~ m/\bdesired-temp:/) {
|
||||||
$txt = "$1 °C" if($txt =~ m/^measured-temp: (.*)/); # FHT fix
|
$txt = "$1 °C" if($txt =~ m/^measured-temp: (.*)/);
|
||||||
$cmdList = "desired-temp" if(!$cmdList);
|
$cmdList = "desired-temp" if(!$cmdList);
|
||||||
|
|
||||||
} elsif(!$dsi && $allSets =~ m/\bdesiredTemperature:/) {
|
} elsif(!$dsi && $allSets =~ m/\bdesiredTemperature:/) {
|
||||||
$txt = ReadingsVal($d, "temperature", ""); # ignores stateFormat!!!
|
$txt = ReadingsVal($d, "temperature", "");
|
||||||
$txt =~ s/ .*//;
|
$txt =~ s/ .*//;
|
||||||
$txt .= "°C";
|
$txt .= "°C";
|
||||||
$cmdList = "desiredTemperature" if(!$cmdList);
|
$cmdList = "desiredTemperature" if(!$cmdList);
|
||||||
|
@ -35,6 +35,15 @@ sub
|
|||||||
SUNRISE_EL_Initialize($)
|
SUNRISE_EL_Initialize($)
|
||||||
{
|
{
|
||||||
my ($hash) = @_;
|
my ($hash) = @_;
|
||||||
|
|
||||||
|
InternalTimer(1, sub() {
|
||||||
|
my $long = AttrVal("global", "longitude", undef);
|
||||||
|
my $lat = AttrVal("global", "latitude", undef);
|
||||||
|
if(( defined($long) && !defined($lat)) ||
|
||||||
|
(!defined($long) && defined($lat))) {
|
||||||
|
Log 1, "SUNRISE: set both longitude and latitude or none of them";
|
||||||
|
}
|
||||||
|
}, undef);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user