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.):
- + @@ -728,6 +730,8 @@ sub WeatherAsHtmlD($;$) {
.locenselicense of the API provider, if available
.licenselicense of the API provider, if available
cityname of town returned for location
codecurrent condition code
conditioncurrent condition
wind_speedsame as wind

+ The weekday of the forecast will be in the language of your FHEM system. Enter {$ENV{LANG}} into the FHEM command line to verify. If nothing is displayed or you see an unexpected language setting, add export LANG=de_DE.UTF-8 or something similar to your FHEM start script, restart FHEM and check again. If you get a locale warning when starting FHEM the required language pack might be missing. It can be installed depending on your OS and your preferences (e.g. dpkg-reconfigure locales, apt-get install language-pack-de or something similar). +
Depending on the chosen API, other readings can be shown as well. The meaning of these readings can be determined from the API provider's documentation. @@ -893,6 +897,8 @@ sub WeatherAsHtmlD($;$) { validitystale, wenn der Veröffentlichungszeitpunkt auf dem entfernten Server vor dem Zeitpunkt der aktuellen Daten (readings) liegt
+ Der Wochentag der Prognose wird in der Sprache Ihres FHEM-Systems angezeigt. Geben Sie zur Überprüfung {$ ENV {LANG}} in die Befehlszeile von FHEM ein. Wenn nichts angezeigt wird oder eine unerwartete Spracheinstellung angezeigt wird, fügen Sie export LANG = de_DE.UTF-8 oder etwas Ähnliches zu Ihrem FHEM-Startskript hinzu. Starten Sie FHEM erneut und überprüfen Sie es erneut. Wenn Sie beim Starten von FHEM eine Ländereinstellung erhalten, fehlt möglicherweise das erforderliche Sprachpaket. Sie kann abhängig von Ihrem Betriebssystem und Ihren Präferenzen installiert werden (z. B. Gebietsschemas dpkg-reconfigure, apt-get install language-pack-de oder ähnliches). +
Je nach verwendeter API ist es durchaus möglich, dass weitere Readings geschrieben werden. Die Bedeutung dieser Readings kann man der API-Beschreibung des Anbieters entnehmen.