mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
update - some minor fixes
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@3536 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
62c7629410
commit
1a333c13d7
@ -237,6 +237,7 @@ OWO_GetStatus($;$){
|
||||
$paraVal = AttrVal($name, $paraName, undef);
|
||||
if(defined($paraVal)){
|
||||
($p, $s, $v, $o) = split(":", AttrVal($name, $paraName, ""));
|
||||
$o = 0 if(!defined($o));
|
||||
$v = ReadingsVal($s, $v, "?") + $o;
|
||||
$dataString = $dataString."&$p=$v";
|
||||
Log $loglevel, "openweather $name reading: $paraName $p $s $v";
|
||||
@ -354,9 +355,9 @@ UpdateReadings($$$){
|
||||
readingsBulkUpdate($hash, $prefix."stationId", $jsonWeather->{id});
|
||||
readingsBulkUpdate($hash, $prefix."lastRxCode", $jsonWeather->{cod});
|
||||
readingsBulkUpdate($hash, $prefix."stationName", $jsonWeather->{name});
|
||||
readingsBulkUpdate($hash, $prefix."humidity", int($jsonWeather->{main}{humidity}));
|
||||
readingsBulkUpdate($hash, $prefix."pressureAbs", int($jsonWeather->{main}{pressure}));
|
||||
readingsBulkUpdate($hash, $prefix."pressureRel", int($jsonWeather->{main}{sea_level}));
|
||||
readingsBulkUpdate($hash, $prefix."humidity", $jsonWeather->{main}{humidity});
|
||||
readingsBulkUpdate($hash, $prefix."pressureAbs", $jsonWeather->{main}{pressure});
|
||||
readingsBulkUpdate($hash, $prefix."pressureRel", $jsonWeather->{main}{sea_level});
|
||||
readingsBulkUpdate($hash, $prefix."windSpeed", $jsonWeather->{wind}{speed});
|
||||
readingsBulkUpdate($hash, $prefix."windDir", int($jsonWeather->{wind}{deg}));
|
||||
readingsBulkUpdate($hash, $prefix."clouds", $jsonWeather->{clouds}{all});
|
||||
|
Loading…
x
Reference in New Issue
Block a user