diff --git a/fhem/CHANGED b/fhem/CHANGED
index b32c2e20a..8e2c5052f 100644
--- a/fhem/CHANGED
+++ b/fhem/CHANGED
@@ -1,5 +1,6 @@
# 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.
+ - bugfix: 59_Weather: fix change attribut model
- bugfix: 98_livetracking: fixed initial Life360 data availability
- feature: 73_PRESENCE: new set command active/inactive to temporarily
disable presence checks
diff --git a/fhem/FHEM/59_Weather.pm b/fhem/FHEM/59_Weather.pm
index 7d18c2d53..9e4bb54e3 100755
--- a/fhem/FHEM/59_Weather.pm
+++ b/fhem/FHEM/59_Weather.pm
@@ -131,12 +131,15 @@ sub Weather_DebugCodes($) {
sub Weather_Initialize($) {
my ($hash) = @_;
- $hash->{DefFn} = "Weather_Define";
- $hash->{UndefFn} = "Weather_Undef";
- $hash->{GetFn} = "Weather_Get";
- $hash->{SetFn} = "Weather_Set";
- $hash->{AttrList}= "disable:0,1 " . $readingFnAttributes;
- $hash->{NotifyFn}= "Weather_Notify";
+ $hash->{DefFn} = 'Weather_Define';
+ $hash->{UndefFn} = 'Weather_Undef';
+ $hash->{GetFn} = 'Weather_Get';
+ $hash->{SetFn} = 'Weather_Set';
+ $hash->{AttrList}=
+ 'disable:0,1 '
+ . 'model '
+ . $readingFnAttributes;
+ $hash->{NotifyFn}= 'Weather_Notify';
#Weather_DebugCodes('de');
}
@@ -432,13 +435,12 @@ sub Weather_Define($$) {
$hash->{API} = $api;
$hash->{APIKEY} = $apikey;
$hash->{APIOPTIONS} = $apioptions;
- $attr{$name}->{model} = $api;
- #$hash->{UNITS} = "c"; # hardcoded to use degrees centigrade (Celsius)
$hash->{READINGS}->{current_date_time}->{TIME}= TimeNow();
$hash->{READINGS}->{current_date_time}->{VAL}= "none";
-
$hash->{fhem}->{allowCache}= 1;
+ CommandAttr(undef,$name . ' model ' . $api) if ( AttrVal($name,'model','none') ne $api );
+
readingsSingleUpdate($hash,'state','Initialized',1);
Weather_LanguageInitialize($hash->{LANG});
@@ -700,7 +702,7 @@ sub WeatherAsHtmlD($;$) {
Valid readings and their meaning (? can be one of 1, 2, 3, 4, 5 and stands
for today, tomorrow, etc.):
.locense | license of the API provider, if available |
.license | license of the API provider, if available |
city | name of town returned for location |
code | current condition code |
condition | current condition |
wind_speed | same as wind |