mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-07 16:59:18 +00:00
59_WUup: handle version via Meta
git-svn-id: https://svn.fhem.de/fhem/trunk@21699 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
10bdfb1bf2
commit
1de61c55a3
@ -62,8 +62,6 @@ BEGIN {
|
|||||||
#-- Export to main context with different name
|
#-- Export to main context with different name
|
||||||
GP_Export(qw( Initialize ));
|
GP_Export(qw( Initialize ));
|
||||||
|
|
||||||
my $version = q(0.10.0);
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Main routines
|
# Main routines
|
||||||
@ -90,7 +88,6 @@ sub Initialize {
|
|||||||
. 'wuwindgustmph wuwindgustmph_10m wuwindspdmph_avg2m wuwindspeedmph '
|
. 'wuwindgustmph wuwindgustmph_10m wuwindspdmph_avg2m wuwindspeedmph '
|
||||||
. 'wuAqPM2.5 wuAqPM10 '
|
. 'wuAqPM2.5 wuAqPM10 '
|
||||||
. $readingFnAttributes;
|
. $readingFnAttributes;
|
||||||
$hash->{VERSION} = $version;
|
|
||||||
|
|
||||||
return FHEM::Meta::InitMod( __FILE__, $hash );
|
return FHEM::Meta::InitMod( __FILE__, $hash );
|
||||||
}
|
}
|
||||||
@ -101,6 +98,10 @@ sub Define {
|
|||||||
|
|
||||||
return $@ unless ( FHEM::Meta::SetInternals($hash) );
|
return $@ unless ( FHEM::Meta::SetInternals($hash) );
|
||||||
|
|
||||||
|
## no critic ( ProhibitComplexVersion )
|
||||||
|
use version 0.77; our $VERSION = version->new( FHEM::Meta::Get( $hash, 'version' ) )->normal;
|
||||||
|
## use critic
|
||||||
|
|
||||||
my @param = split( "[ \t][ \t]*", $def );
|
my @param = split( "[ \t][ \t]*", $def );
|
||||||
|
|
||||||
return q{syntax: define <name> WUup <stationID> <password>}
|
return q{syntax: define <name> WUup <stationID> <password>}
|
||||||
@ -108,7 +109,7 @@ sub Define {
|
|||||||
|
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
|
|
||||||
$hash->{VERSION} = $version;
|
$hash->{VERSION} = $VERSION;
|
||||||
$hash->{INTERVAL} = 300;
|
$hash->{INTERVAL} = 300;
|
||||||
|
|
||||||
$hash->{helper}{stationid} = $param[2];
|
$hash->{helper}{stationid} = $param[2];
|
||||||
@ -339,37 +340,6 @@ sub receive {
|
|||||||
# Documentation
|
# Documentation
|
||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
|
||||||
# Changelog:
|
|
||||||
#
|
|
||||||
# 2017-01-23 initial release
|
|
||||||
# 2017-02-10 added german docu
|
|
||||||
# 2017-02-22 fixed bug when module cannot get reenabled after disabling
|
|
||||||
# added disabledForIntervals
|
|
||||||
# changed attribute WUInterval to interval
|
|
||||||
# default interval 300
|
|
||||||
# 2017-02-23 added attribute unit_windspeed
|
|
||||||
# converted units rounded to 4 decimal places
|
|
||||||
# 2017-03-16 implemented non-blocking mode
|
|
||||||
# 2017-08-16 integrated RapidFire mode (thanks to Scooty66)
|
|
||||||
# 2017-10-10 added windspdmph_avg2m, winddir_avg2m, windgustmph_10m,
|
|
||||||
# windgustdir_10m (thanks to Aeroschmelz for reminding me)
|
|
||||||
# timeout raised to 6s, fixed state error (thanks to mumpitzstuff)
|
|
||||||
# 2017-10-16 fixed attributes
|
|
||||||
# 2017-10-19 added set-command "update"
|
|
||||||
# 2018-03-19 solarradiation calculated from lux to W/m² (thanks to dieter114)
|
|
||||||
# 2018-04-10 added attribute round
|
|
||||||
# 2018-04-13 added AqPM2.5 and AqPM10
|
|
||||||
# 2018-08-15 added attribute unit_solarradiation
|
|
||||||
# 2019-07-04 replaced link to API documentation
|
|
||||||
# 2019-07-05 add Meta support
|
|
||||||
# 2019-07-09 add WIKI to Meta data
|
|
||||||
# 2020-03-12 use UConv to calculate solarradiation from lux to W/m²
|
|
||||||
# 2020-03-25 remove prototypes
|
|
||||||
# 2020-03-26 code cleanup
|
|
||||||
# 2020-03-30 remove default attributes, use of internal defaults
|
|
||||||
#
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
=pod
|
=pod
|
||||||
|
|
||||||
@ -601,7 +571,7 @@ sub receive {
|
|||||||
"license": [
|
"license": [
|
||||||
"gpl_2"
|
"gpl_2"
|
||||||
],
|
],
|
||||||
"version": "v0.10.0",
|
"version": "v0.10.1",
|
||||||
"release_status": "stable",
|
"release_status": "stable",
|
||||||
"author": [
|
"author": [
|
||||||
"Manfred Winter <mahowi@gmail.com>"
|
"Manfred Winter <mahowi@gmail.com>"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user