Unit.pm: RType preparation

git-svn-id: https://svn.fhem.de/fhem/trunk@12543 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jpawlowski 2016-11-10 23:33:13 +00:00
parent 90a4abdc6a
commit fdc442cd24
4 changed files with 1619 additions and 1431 deletions

View File

@ -73,62 +73,75 @@ sub HP1000_Initialize($) {
"wu_push:1,0 wu_id wu_password wu_realtime:1,0 extSrvPush_Url stateReadingsLang:en,de,at,ch,nl,fr,pl stateReadings stateReadingsFormat:0,1,2 " "wu_push:1,0 wu_id wu_password wu_realtime:1,0 extSrvPush_Url stateReadingsLang:en,de,at,ch,nl,fr,pl stateReadings stateReadingsFormat:0,1,2 "
. $readingFnAttributes; . $readingFnAttributes;
$hash->{readingsFormat} = {
'activity' => {
ref => 'oknok',
scope => [ 'dead', 'alive' ],
},
};
$hash->{readingsDesc} = { $hash->{readingsDesc} = {
"UV" => { "unit" => "uvi", }, 'Activity' => { rtype => 'activity', },
"UVR" => { "unit" => "uwpscm", }, 'UV' => { rtype => 'uvi', },
"dewpoint" => { "unit" => "c", }, 'UVR' => { rtype => 'uwpscm', },
"dewpoint_f" => { "unit" => "f", }, 'dewpoint' => { rtype => 'c', },
"humidity" => { "unit" => "pct", }, 'dewpoint_f' => { rtype => 'f', },
"humidityAbs" => { "unit" => "c", }, 'humidity' => { rtype => 'pct', formula_symbol => 'H' },
"humidityAbs_f" => { "unit" => "f", }, 'humidityAbs' => { rtype => 'c', },
"indoorDewpoint" => { "unit" => "c", }, 'humidityAbs_f' => { rtype => 'f', },
"indoorDewpoint_f" => { "unit" => "f", }, 'indoorDewpoint' => { rtype => 'c', },
"indoorHumidity" => { "unit" => "pct", }, 'indoorDewpoint_f' => { rtype => 'f', },
"indoorHumidityAbs" => { "unit" => "c", }, 'indoorHumidity' => { rtype => 'pct', },
"indoorHumidityAbs_f" => { "unit" => "f", }, 'indoorHumidityAbs' => { rtype => 'c', },
"indoorTemperature" => { "unit" => "c", }, 'indoorHumidityAbs_f' => { rtype => 'f', },
"indoorTemperature_f" => { "unit" => "f", }, 'indoorTemperature' => { rtype => 'c', },
"luminosity" => { "unit" => "lx", }, 'indoorTemperature_f' => { rtype => 'f', },
"pressure" => { "unit" => "hpamb", }, 'israining' => { rtype => 'bool', },
"pressureAbs_in" => { "unit" => "inhg", }, 'luminosity' => { rtype => 'lx', },
"pressureAbs_mm" => { "unit" => "mmhg", }, 'pressure' => { rtype => 'hpamb', },
"pressure_in" => { "unit" => "inhg", }, 'pressureAbs' => { rtype => 'hpamb', },
"pressure_mm" => { "unit" => "mmhg", }, 'pressureAbs_in' => { rtype => 'inhg', },
"rain" => { "unit" => "mm", }, 'pressureAbs_mm' => { rtype => 'mmhg', },
"rain_day" => { "unit" => "mm", }, 'pressure_in' => { rtype => 'inhg', },
"rain_day_in" => { "unit" => "in", }, 'pressure_mm' => { rtype => 'mmhg', },
"rain_in" => { "unit" => "in", }, 'rain' => { rtype => 'mm', },
"rain_month" => { "unit" => "mm", }, 'rain_day' => { rtype => 'mm', },
"rain_month_in" => { "unit" => "in", }, 'rain_day_in' => { rtype => 'in', },
"rain_week" => { "unit" => "mm", }, 'rain_in' => { rtype => 'in', },
"rain_week_in" => { "unit" => "in", }, 'rain_month' => { rtype => 'mm', },
"rain_year" => { "unit" => "mm", }, 'rain_month_in' => { rtype => 'in', },
"rain_year_in" => { "unit" => "in", }, 'rain_week' => { rtype => 'mm', },
"solarradiation" => { "unit" => "wpsm", }, 'rain_week_in' => { rtype => 'in', },
"temperature" => { "unit" => "c", }, 'rain_year' => { rtype => 'mm', },
"temperature_f" => { "unit" => "f", }, 'rain_year_in' => { rtype => 'in', },
"wind_chill" => { "unit" => "c", }, 'solarradiation' => { rtype => 'wpsm', },
"wind_chill_f" => { "unit" => "f", }, 'temperature' => { rtype => 'c', },
"wind_direction" => { "unit" => "gon", }, 'temperature_f' => { rtype => 'f', },
"wind_direction_avg2m" => { "unit" => "gon", }, 'wind_compasspoint' => { rtype => 'compasspoint', },
"wind_gust" => { "unit" => "kmh", }, 'wind_compasspoint_avg2m' => { rtype => 'compasspoint', },
"wind_gust_bft" => { "unit" => "bft", }, 'wind_chill' => { rtype => 'c', formula_symbol => 'Wc', },
"wind_gust_fts" => { "unit" => "fts", }, 'wind_chill_f' => { rtype => 'f', formula_symbol => 'Wc', },
"wind_gust_kn" => { "unit" => "kn", }, 'wind_direction' => { rtype => 'direction', formula_symbol => 'Wdir', },
"wind_gust_mph" => { "unit" => "mph", }, 'wind_direction_avg2m' =>
"wind_gust_mph_sum10m" => { "unit" => "mph", }, { rtype => 'direction', formula_symbol => 'Wdir', },
"wind_gust_mps" => { "unit" => "mps", }, 'wind_gust' => { rtype => 'kmh', formula_symbol => 'Wg', },
"wind_gust_sum10m" => { "unit" => "kmh", }, 'wind_gust_bft' => { rtype => 'bft', formula_symbol => 'Wg', },
"wind_speed" => { "unit" => "kmh", }, 'wind_gust_fts' => { rtype => 'fts', formula_symbol => 'Wg', },
"wind_speed_avg2m" => { "unit" => "kmh", }, 'wind_gust_kn' => { rtype => 'kn', formula_symbol => 'Wg', },
"wind_speed_bft" => { "unit" => "bft", }, 'wind_gust_mph' => { rtype => 'mph', formula_symbol => 'Wg', },
"wind_speed_bft_avg2m" => { "unit" => "bft", }, 'wind_gust_mph_sum10m' => { rtype => 'mph', formula_symbol => 'Wg', },
"wind_speed_kn" => { "unit" => "kn", }, 'wind_gust_mps' => { rtype => 'mps', formula_symbol => 'Wg', },
"wind_speed_kn_avg2m" => { "unit" => "kn", }, 'wind_gust_sum10m' => { rtype => 'kmh', formula_symbol => 'Wg', },
"wind_speed_mph" => { "unit" => "mph", }, 'wind_speed' => { rtype => 'kmh', formula_symbol => 'Ws', },
"wind_speed_mph_avg2m" => { "unit" => "mph", }, 'wind_speed_avg2m' => { rtype => 'kmh', formula_symbol => 'Ws', },
"wind_speed_mps" => { "unit" => "mps", }, 'wind_speed_bft' => { rtype => 'bft', formula_symbol => 'Ws', },
"wind_speed_mps_avg2m" => { "unit" => "mps", }, 'wind_speed_bft_avg2m' => { rtype => 'bft', formula_symbol => 'Ws', },
'wind_speed_kn' => { rtype => 'kn', formula_symbol => 'Ws', },
'wind_speed_kn_avg2m' => { rtype => 'kn', formula_symbol => 'Ws', },
'wind_speed_mph' => { rtype => 'mph', formula_symbol => 'Ws', },
'wind_speed_mph_avg2m' => { rtype => 'mph', formula_symbol => 'Ws', },
'wind_speed_mps' => { rtype => 'mps', formula_symbol => 'Ws', },
'wind_speed_mps_avg2m' => { rtype => 'mps', formula_symbol => 'Ws', },
}; };
} }
@ -921,7 +934,7 @@ sub HP1000_CGI() {
# wind_compasspoint # wind_compasspoint
if ( defined( $webArgs->{winddir} ) ) { if ( defined( $webArgs->{winddir} ) ) {
$webArgs->{windcompasspoint} = $webArgs->{windcompasspoint} =
UConv::deg2compasspoint( $webArgs->{winddir} ); UConv::direction2compasspoint( $webArgs->{winddir} );
readingsBulkUpdate( $hash, "wind_compasspoint", readingsBulkUpdate( $hash, "wind_compasspoint",
$webArgs->{windcompasspoint} ); $webArgs->{windcompasspoint} );
} }
@ -982,7 +995,7 @@ sub HP1000_CGI() {
# averages/wind_compasspoint_avg2m # averages/wind_compasspoint_avg2m
if ( defined( $webArgs->{winddir_avg2m} ) ) { if ( defined( $webArgs->{winddir_avg2m} ) ) {
$webArgs->{windcompasspoint_avg2m} = $webArgs->{windcompasspoint_avg2m} =
UConv::deg2compasspoint( $webArgs->{winddir_avg2m} ); UConv::direction2compasspoint( $webArgs->{winddir_avg2m} );
readingsBulkUpdate( $hash, "wind_compasspoint_avg2m", readingsBulkUpdate( $hash, "wind_compasspoint_avg2m",
$webArgs->{windcompasspoint_avg2m} ); $webArgs->{windcompasspoint_avg2m} );
} }
@ -1074,9 +1087,11 @@ sub HP1000_CGI() {
my $stateReadingsLang = AttrVal( $name, "stateReadingsLang", "en" ); my $stateReadingsLang = AttrVal( $name, "stateReadingsLang", "en" );
my $stateReadingsFormat = AttrVal( $name, "stateReadingsFormat", "0" ); my $stateReadingsFormat = AttrVal( $name, "stateReadingsFormat", "0" );
$result = # $result =
getMultiValStatus( $name, $stateReadings, # makeSTATE( $name, $stateReadings,
$stateReadingsLang, $stateReadingsFormat ); # $stateReadingsLang, $stateReadingsFormat );
$result = makeSTATE( $name, $stateReadings, $stateReadingsFormat );
readingsBulkUpdate( $hash, "state", $result ); readingsBulkUpdate( $hash, "state", $result );
readingsEndUpdate( $hash, 1 ); readingsEndUpdate( $hash, 1 );

View File

@ -58,117 +58,118 @@ sub Wunderground_Initialize($) {
. $readingFnAttributes; . $readingFnAttributes;
$hash->{readingsDesc} = { $hash->{readingsDesc} = {
"UV" => { "unit" => "uvi" }, 'UV' => { rtype => 'uvi' },
"dewpoint" => { "unit" => "c" }, 'dewpoint' => { rtype => 'c' },
"dewpoint_f" => { "unit" => "f" }, 'dewpoint_f' => { rtype => 'f' },
"fc0_high_c" => { "unit" => "c" }, 'fc0_high_c' => { rtype => 'c' },
"fc0_high_f" => { "unit" => "f" }, 'fc0_high_f' => { rtype => 'f' },
"fc0_humidity" => { "unit" => "pct" }, 'fc0_humidity' => { rtype => 'pct', formula_symbol => 'H' },
"fc0_humidity_max" => { "unit" => "pct" }, 'fc0_humidity_max' => { rtype => 'pct', formula_symbol => 'H' },
"fc0_humidity_min" => { "unit" => "pct" }, 'fc0_humidity_min' => { rtype => 'pct', formula_symbol => 'H' },
"fc0_low_c" => { "unit" => "c" }, 'fc0_low_c' => { rtype => 'c' },
"fc0_low_f" => { "unit" => "f" }, 'fc0_low_f' => { rtype => 'f' },
"fc0_rain_day" => { "unit" => "mm" }, 'fc0_rain_day' => { rtype => 'mm' },
"fc0_rain_day_in" => { "unit" => "in" }, 'fc0_rain_day_in' => { rtype => 'in' },
"fc0_rain_night" => { "unit" => "mm" }, 'fc0_rain_night' => { rtype => 'mm' },
"fc0_rain_night_in" => { "unit" => "in" }, 'fc0_rain_night_in' => { rtype => 'in' },
"fc0_snow_day" => { "unit" => "cm" }, 'fc0_snow_day' => { rtype => 'cm' },
"fc0_snow_day_in" => { "unit" => "in" }, 'fc0_snow_day_in' => { rtype => 'in' },
"fc0_snow_night" => { "unit" => "cm" }, 'fc0_snow_night' => { rtype => 'cm' },
"fc0_snow_night_in" => { "unit" => "in" }, 'fc0_snow_night_in' => { rtype => 'in' },
"fc0_wind_direction" => { "unit" => "gon" }, 'fc0_wind_direction' => { rtype => 'gon' },
"fc0_wind_direction_max" => { "unit" => "gon" }, 'fc0_wind_direction_max' => { rtype => 'gon' },
"fc0_wind_speed" => { "unit" => "kmh" }, 'fc0_wind_speed' => { rtype => 'kmh', formula_symbol => 'Ws' },
"fc0_wind_speed_max" => { "unit" => "kmh" }, 'fc0_wind_speed_max' => { rtype => 'kmh', formula_symbol => 'Ws' },
"fc0_wind_speed_max_mph" => { "unit" => "mph" }, 'fc0_wind_speed_max_mph' => { rtype => 'mph', formula_symbol => 'Ws' },
"fc0_wind_speed_mph" => { "unit" => "mph" }, 'fc0_wind_speed_mph' => { rtype => 'mph', formula_symbol => 'Ws' },
"fc1_high_c" => { "unit" => "c" }, 'fc1_high_c' => { rtype => 'c' },
"fc1_high_f" => { "unit" => "f" }, 'fc1_high_f' => { rtype => 'f' },
"fc1_humidity" => { "unit" => "pct" }, 'fc1_humidity' => { rtype => 'pct', formula_symbol => 'H' },
"fc1_humidity_max" => { "unit" => "pct" }, 'fc1_humidity_max' => { rtype => 'pct', formula_symbol => 'H' },
"fc1_humidity_min" => { "unit" => "pct" }, 'fc1_humidity_min' => { rtype => 'pct', formula_symbol => 'H' },
"fc1_low_c" => { "unit" => "c" }, 'fc1_low_c' => { rtype => 'c' },
"fc1_low_f" => { "unit" => "f" }, 'fc1_low_f' => { rtype => 'f' },
"fc1_rain_day" => { "unit" => "mm" }, 'fc1_rain_day' => { rtype => 'mm' },
"fc1_rain_day_in" => { "unit" => "in" }, 'fc1_rain_day_in' => { rtype => 'in' },
"fc1_rain_night" => { "unit" => "mm" }, 'fc1_rain_night' => { rtype => 'mm' },
"fc1_rain_night_in" => { "unit" => "in" }, 'fc1_rain_night_in' => { rtype => 'in' },
"fc1_snow_day" => { "unit" => "cm" }, 'fc1_snow_day' => { rtype => 'cm' },
"fc1_snow_day_in" => { "unit" => "in" }, 'fc1_snow_day_in' => { rtype => 'in' },
"fc1_snow_night" => { "unit" => "cm" }, 'fc1_snow_night' => { rtype => 'cm' },
"fc1_snow_night_in" => { "unit" => "in" }, 'fc1_snow_night_in' => { rtype => 'in' },
"fc1_wind_direction" => { "unit" => "gon" }, 'fc1_wind_direction' => { rtype => 'gon' },
"fc1_wind_direction_max" => { "unit" => "gon" }, 'fc1_wind_direction_max' => { rtype => 'gon' },
"fc1_wind_speed" => { "unit" => "kmh" }, 'fc1_wind_speed' => { rtype => 'kmh', formula_symbol => 'Ws' },
"fc1_wind_speed_max" => { "unit" => "kmh" }, 'fc1_wind_speed_max' => { rtype => 'kmh', formula_symbol => 'Ws' },
"fc1_wind_speed_max_mph" => { "unit" => "mph" }, 'fc1_wind_speed_max_mph' => { rtype => 'mph', formula_symbol => 'Ws' },
"fc1_wind_speed_mph" => { "unit" => "mph" }, 'fc1_wind_speed_mph' => { rtype => 'mph', formula_symbol => 'Ws' },
"fc2_high_c" => { "unit" => "c" }, 'fc2_high_c' => { rtype => 'c' },
"fc2_high_f" => { "unit" => "f" }, 'fc2_high_f' => { rtype => 'f' },
"fc2_humidity" => { "unit" => "pct" }, 'fc2_humidity' => { rtype => 'pct', formula_symbol => 'H' },
"fc2_humidity_max" => { "unit" => "pct" }, 'fc2_humidity_max' => { rtype => 'pct', formula_symbol => 'H' },
"fc2_humidity_min" => { "unit" => "pct" }, 'fc2_humidity_min' => { rtype => 'pct', formula_symbol => 'H' },
"fc2_low_c" => { "unit" => "c" }, 'fc2_low_c' => { rtype => 'c' },
"fc2_low_f" => { "unit" => "f" }, 'fc2_low_f' => { rtype => 'f' },
"fc2_rain_day" => { "unit" => "mm" }, 'fc2_rain_day' => { rtype => 'mm' },
"fc2_rain_day_in" => { "unit" => "in" }, 'fc2_rain_day_in' => { rtype => 'in' },
"fc2_rain_night" => { "unit" => "mm" }, 'fc2_rain_night' => { rtype => 'mm' },
"fc2_rain_night_in" => { "unit" => "in" }, 'fc2_rain_night_in' => { rtype => 'in' },
"fc2_snow_day" => { "unit" => "cm" }, 'fc2_snow_day' => { rtype => 'cm' },
"fc2_snow_day_in" => { "unit" => "in" }, 'fc2_snow_day_in' => { rtype => 'in' },
"fc2_snow_night" => { "unit" => "cm" }, 'fc2_snow_night' => { rtype => 'cm' },
"fc2_snow_night_in" => { "unit" => "in" }, 'fc2_snow_night_in' => { rtype => 'in' },
"fc2_wind_direction" => { "unit" => "gon" }, 'fc2_wind_direction' => { rtype => 'gon' },
"fc2_wind_direction_max" => { "unit" => "gon" }, 'fc2_wind_direction_max' => { rtype => 'gon' },
"fc2_wind_speed" => { "unit" => "kmh" }, 'fc2_wind_speed' => { rtype => 'kmh', formula_symbol => 'Ws' },
"fc2_wind_speed_max" => { "unit" => "kmh" }, 'fc2_wind_speed_max' => { rtype => 'kmh', formula_symbol => 'Ws' },
"fc2_wind_speed_max_mph" => { "unit" => "mph" }, 'fc2_wind_speed_max_mph' => { rtype => 'mph', formula_symbol => 'Ws' },
"fc2_wind_speed_mph" => { "unit" => "mph" }, 'fc2_wind_speed_mph' => { rtype => 'mph', formula_symbol => 'Ws' },
"fc3_high_c" => { "unit" => "c" }, 'fc3_high_c' => { rtype => 'c' },
"fc3_high_f" => { "unit" => "f" }, 'fc3_high_f' => { rtype => 'f' },
"fc3_humidity" => { "unit" => "pct" }, 'fc3_humidity' => { rtype => 'pct', formula_symbol => 'H' },
"fc3_humidity_max" => { "unit" => "pct" }, 'fc3_humidity_max' => { rtype => 'pct', formula_symbol => 'H' },
"fc3_humidity_min" => { "unit" => "pct" }, 'fc3_humidity_min' => { rtype => 'pct', formula_symbol => 'H' },
"fc3_low_c" => { "unit" => "c" }, 'fc3_low_c' => { rtype => 'c' },
"fc3_low_f" => { "unit" => "f" }, 'fc3_low_f' => { rtype => 'f' },
"fc3_rain_day" => { "unit" => "mm" }, 'fc3_rain_day' => { rtype => 'mm' },
"fc3_rain_day_in" => { "unit" => "in" }, 'fc3_rain_day_in' => { rtype => 'in' },
"fc3_rain_night" => { "unit" => "mm" }, 'fc3_rain_night' => { rtype => 'mm' },
"fc3_rain_night_in" => { "unit" => "in" }, 'fc3_rain_night_in' => { rtype => 'in' },
"fc3_snow_day" => { "unit" => "cm" }, 'fc3_snow_day' => { rtype => 'cm' },
"fc3_snow_day_in" => { "unit" => "in" }, 'fc3_snow_day_in' => { rtype => 'in' },
"fc3_snow_night" => { "unit" => "cm" }, 'fc3_snow_night' => { rtype => 'cm' },
"fc3_snow_night_in" => { "unit" => "in" }, 'fc3_snow_night_in' => { rtype => 'in' },
"fc3_wind_direction" => { "unit" => "gon" }, 'fc3_wind_direction' => { rtype => 'gon' },
"fc3_wind_direction_max" => { "unit" => "gon" }, 'fc3_wind_direction_max' => { rtype => 'gon' },
"fc3_wind_speed" => { "unit" => "kmh" }, 'fc3_wind_speed' => { rtype => 'kmh', formula_symbol => 'Ws' },
"fc3_wind_speed_max" => { "unit" => "kmh" }, 'fc3_wind_speed_max' => { rtype => 'kmh', formula_symbol => 'Ws' },
"fc3_wind_speed_max_mph" => { "unit" => "mph" }, 'fc3_wind_speed_max_mph' => { rtype => 'mph', formula_symbol => 'Ws' },
"fc3_wind_speed_mph" => { "unit" => "mph" }, 'fc3_wind_speed_mph' => { rtype => 'mph', formula_symbol => 'Ws' },
"feelslike_c" => { "unit" => "c" }, 'feelslike_c' => { rtype => 'c' },
"feelslike_f" => { "unit" => "f" }, 'feelslike_f' => { rtype => 'f' },
"heat_index_c" => { "unit" => "c" }, 'heat_index_c' => { rtype => 'c' },
"heat_index_f" => { "unit" => "f" }, 'heat_index_f' => { rtype => 'f' },
"humidity" => { "unit" => "pct" }, 'humidity' => { rtype => 'pct', formula_symbol => 'H' },
"moon_pct" => { "unit" => "pct" }, 'israining' => { rtype => 'bool', },
"pressure" => { "unit" => "hpamb" }, 'moon_pct' => { rtype => 'pct' },
"pressure_in" => { "unit" => "inhg" }, 'pressure' => { rtype => 'hpamb' },
"rain" => { "unit" => "mm" }, 'pressure_in' => { rtype => 'inhg' },
"rain_day" => { "unit" => "mm" }, 'rain' => { rtype => 'mm' },
"rain_day_in" => { "unit" => "in" }, 'rain_day' => { rtype => 'mm' },
"rain_in" => { "unit" => "in" }, 'rain_day_in' => { rtype => 'in' },
"solarradiation" => { "unit" => "wpsm" }, 'rain_in' => { rtype => 'in' },
"temp_c" => { "unit" => "c" }, 'solarradiation' => { rtype => 'wpsm' },
"temp_f" => { "unit" => "f" }, 'temp_c' => { rtype => 'c' },
"visibility" => { "unit" => "km" }, 'temp_f' => { rtype => 'f' },
"visibility_mi" => { "unit" => "mi" }, 'visibility' => { rtype => 'km' },
"wind_chill" => { "unit" => "c" }, 'visibility_mi' => { rtype => 'mi' },
"wind_chill_f" => { "unit" => "f" }, 'wind_chill' => { rtype => 'c', formula_symbol => 'Wc' },
"wind_direction" => { "unit" => "gon" }, 'wind_chill_f' => { rtype => 'f', formula_symbol => 'Wc' },
"wind_gust" => { "unit" => "kmh" }, 'wind_direction' => { rtype => 'direction' },
"wind_gust_mph" => { "unit" => "mph" }, 'wind_gust' => { rtype => 'kmh', formula_symbol => 'Wg' },
"wind_speed" => { "unit" => "kmh" }, 'wind_gust_mph' => { rtype => 'mph', formula_symbol => 'Wg' },
"wind_speed_mph" => { "unit" => "mph" } 'wind_speed' => { rtype => 'kmh', formula_symbol => 'Ws' },
'wind_speed_mph' => { rtype => 'mph', formula_symbol => 'Ws' }
}; };
return; return;
@ -402,13 +403,14 @@ sub Wunderground_ReceiveCommand($$$) {
my $stateReadingsLang = AttrVal( $name, "stateReadingsLang", "en" ); my $stateReadingsLang = AttrVal( $name, "stateReadingsLang", "en" );
my $stateReadingsFormat = AttrVal( $name, "stateReadingsFormat", "0" ); my $stateReadingsFormat = AttrVal( $name, "stateReadingsFormat", "0" );
$state = # $state =
getMultiValStatus( $name, $stateReadings, # makeSTATE( $name, $stateReadings,
$stateReadingsLang, $stateReadingsFormat ); # $stateReadingsLang, $stateReadingsFormat );
$state = makeSTATE( $name, $stateReadings, $stateReadingsFormat );
readingsBulkUpdate( $hash, "state", $state ); readingsBulkUpdate( $hash, "state", $state );
readingsBulkUpdateIfChanged( $hash, "lastQueryResult", readingsBulkUpdateIfChanged( $hash, "lastQueryResult", $lastQueryResult );
$lastQueryResult );
readingsEndUpdate( $hash, 1 ); readingsEndUpdate( $hash, 1 );
return; return;
@ -650,8 +652,7 @@ sub Wunderground_Hash2Readings($$;$) {
$h->{icon} ); $h->{icon} );
readingsBulkUpdate( $hash, $reading . "icon_url$night", readingsBulkUpdate( $hash, $reading . "icon_url$night",
$h->{icon_url} ); $h->{icon_url} );
readingsBulkUpdate( $hash, $reading . "pop$night", readingsBulkUpdate( $hash, $reading . "pop$night", $h->{pop} );
$h->{pop} );
readingsBulkUpdate( $hash, $reading . "text$night", readingsBulkUpdate( $hash, $reading . "text$night",
$h->{fcttext_metric} ); $h->{fcttext_metric} );
readingsBulkUpdate( $hash, $reading . "text_f$night", readingsBulkUpdate( $hash, $reading . "text_f$night",

View File

@ -9,7 +9,6 @@ sub UConv_Initialize() {
} }
package UConv; package UConv;
use Unit;
use Scalar::Util qw(looks_like_number); use Scalar::Util qw(looks_like_number);
use Data::Dumper; use Data::Dumper;
@ -258,7 +257,7 @@ sub ft2m($;$) {
### ###
# convert direction in degree to point of the compass # convert direction in degree to point of the compass
sub deg2compasspoint($;$) { sub direction2compasspoint($;$) {
my ( $azimuth, $lang ) = @_; my ( $azimuth, $lang ) = @_;
my $directions_txt_i18n; my $directions_txt_i18n;

File diff suppressed because it is too large Load Diff