mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-13 11:16:36 +00:00
59_WUup: use CommandAttr for default attributes
git-svn-id: https://svn.fhem.de/fhem/trunk@21541 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
0302ac4f53
commit
e2d1469bdb
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- change: 59_WUup: use CommandAttr for default attributes
|
||||||
- feature: 66_EseraOneWire: add support for Esera 11233, dual output
|
- feature: 66_EseraOneWire: add support for Esera 11233, dual output
|
||||||
- bugfix: 71_YAMAHA_AVR: use correct dsp command for RX-V2065 model
|
- bugfix: 71_YAMAHA_AVR: use correct dsp command for RX-V2065 model
|
||||||
- change: 57_Calendar: treatment of cutoffOlderThan amended for series
|
- change: 57_Calendar: treatment of cutoffOlderThan amended for series
|
||||||
|
@ -35,7 +35,7 @@ use HttpUtils;
|
|||||||
use UConv;
|
use UConv;
|
||||||
use FHEM::Meta;
|
use FHEM::Meta;
|
||||||
|
|
||||||
my $version = "0.9.15";
|
my $version = "0.9.16";
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
@ -93,10 +93,21 @@ sub WUup_Define {
|
|||||||
|
|
||||||
readingsSingleUpdate( $hash, "state", "defined", 1 );
|
readingsSingleUpdate( $hash, "state", "defined", 1 );
|
||||||
|
|
||||||
$attr{$name}{room} //= "Weather";
|
#$attr{$name}{room} //= "Weather";
|
||||||
$attr{$name}{unit_windspeed} //= "km/h";
|
CommandAttr( undef, "$name room Weather" )
|
||||||
$attr{$name}{unit_solarradiation} //= "lux";
|
if ( AttrVal( $name, "room", "" ) eq q{} );
|
||||||
$attr{$name}{round} //= 4;
|
|
||||||
|
#$attr{$name}{unit_windspeed} //= "km/h";
|
||||||
|
CommandAttr( undef, "$name unit_windspeed km/h" )
|
||||||
|
if ( AttrVal( $name, "unit_windspeed", "" ) eq q{} );
|
||||||
|
|
||||||
|
#$attr{$name}{unit_solarradiation} //= "lux";
|
||||||
|
CommandAttr( undef, "$name unit_solarradiation lux" )
|
||||||
|
if ( AttrVal( $name, "unit_solarradiation", "" ) eq q{} );
|
||||||
|
|
||||||
|
#$attr{$name}{round} //= 4;
|
||||||
|
CommandAttr( undef, "$name round 4" )
|
||||||
|
if ( AttrVal( $name, "round", "" ) eq q{} );
|
||||||
|
|
||||||
RemoveInternalTimer($hash);
|
RemoveInternalTimer($hash);
|
||||||
|
|
||||||
@ -225,12 +236,21 @@ sub WUup_send {
|
|||||||
$url .= "?ID=" . $hash->{helper}{stationid};
|
$url .= "?ID=" . $hash->{helper}{stationid};
|
||||||
$url .= "&PASSWORD=" . $hash->{helper}{password};
|
$url .= "&PASSWORD=" . $hash->{helper}{password};
|
||||||
my $datestring = strftime "%F+%T", gmtime;
|
my $datestring = strftime "%F+%T", gmtime;
|
||||||
|
|
||||||
$datestring =~ s/:/%3A/g;
|
$datestring =~ s/:/%3A/g;
|
||||||
$url .= "&dateutc=" . $datestring;
|
$url .= "&dateutc=" . $datestring;
|
||||||
|
|
||||||
$attr{$name}{unit_windspeed} //= "km/h";
|
#$attr{$name}{unit_windspeed} //= "km/h";
|
||||||
$attr{$name}{unit_solarradiation} //= "lux";
|
CommandAttr( undef, "$name unit_windspeed km/h" )
|
||||||
$attr{$name}{round} //= 4;
|
if ( AttrVal( $name, "unit_windspeed", "" ) eq q{} );
|
||||||
|
|
||||||
|
#$attr{$name}{unit_solarradiation} //= "lux";
|
||||||
|
CommandAttr( undef, "$name unit_solarradiation lux" )
|
||||||
|
if ( AttrVal( $name, "unit_solarradiation", "" ) eq q{} );
|
||||||
|
|
||||||
|
#$attr{$name}{round} //= 4;
|
||||||
|
CommandAttr( undef, "$name round 4" )
|
||||||
|
if ( AttrVal( $name, "round", "" ) eq q{} );
|
||||||
|
|
||||||
my ( $data, $d, $r, $o );
|
my ( $data, $d, $r, $o );
|
||||||
my $a = $attr{$name};
|
my $a = $attr{$name};
|
||||||
@ -373,6 +393,7 @@ sub WUup_receive {
|
|||||||
# 2020-03-12 use UConv to calculate solarradiation from lux to W/m²
|
# 2020-03-12 use UConv to calculate solarradiation from lux to W/m²
|
||||||
# 2020-03-25 remove prototypes
|
# 2020-03-25 remove prototypes
|
||||||
# 2020-03-26 code cleanup
|
# 2020-03-26 code cleanup
|
||||||
|
# 2020-03-30 use CommandAttr for default attributes
|
||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
@ -606,7 +627,7 @@ sub WUup_receive {
|
|||||||
"license": [
|
"license": [
|
||||||
"gpl_2"
|
"gpl_2"
|
||||||
],
|
],
|
||||||
"version": "v0.9.15",
|
"version": "v0.9.16",
|
||||||
"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