Compare commits
	
		
			3 Commits
		
	
	
		
			dbd7d760aa
			...
			437d04b87c
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 437d04b87c | |||
| 82d0e6b1b6 | |||
| e84d810e39 | 
							
								
								
									
										54
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										54
									
								
								CHANGELOG.md
									
									
									
									
									
								
							@@ -1,4 +1,54 @@
 | 
				
			|||||||
### Remove DarkSky API support from Weather module (HEAD -> patch-newversion)
 | 
					### Update version to 2.3.1 and fix conditionals in Weather.pm (HEAD -> patch-mod-weather)
 | 
				
			||||||
 | 
					>Thu, 16 Oct 2025 19:01:00 +0200
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					>Author: Marko Oldenburg (fhemdevelopment@cooltux.net)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					>Commiter: Marko Oldenburg (fhemdevelopment@cooltux.net)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This commit updates the version number in the FHEM weather module
 | 
				
			||||||
 | 
					from 2.3.0 to 2.3.1 to reflect the latest changes.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					In addition to the version bump, several conditionals in
 | 
				
			||||||
 | 
					lib/FHEM/Core/Weather.pm have been corrected. Specifically, the
 | 
				
			||||||
 | 
					syntax for checking the command attributes has been fixed to ensure
 | 
				
			||||||
 | 
					proper evaluation of the conditions.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					These changes improve code clarity and correctness, which helps
 | 
				
			||||||
 | 
					in maintaining the module. There are no breaking changes in this
 | 
				
			||||||
 | 
					commit, and existing functionality remains intact.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Remove DarkSky API support from Weather module (tag: v2.3.0, origin/testing, origin/main, origin/dev, origin/HEAD, testing, main, dev)
 | 
				
			||||||
 | 
					>Tue, 14 Oct 2025 07:35:31 +0200
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					>Author: Marko Oldenburg (fhemdevelopment@cooltux.net)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					>Commiter: Marko Oldenburg (fhemdevelopment@cooltux.net)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The DarkSky API support has been removed from the Weather module
 | 
				
			||||||
 | 
					documentation, affecting both English and German sections. The API
 | 
				
			||||||
 | 
					documentation now focuses solely on the OpenWeatherMap API.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Changes include the deletion of DarkSky references in `59_Weather.pm`
 | 
				
			||||||
 | 
					and updates to example command snippets to refer to the
 | 
				
			||||||
 | 
					OpenWeatherMap API. The version number was incremented from
 | 
				
			||||||
 | 
					v2.2.35 to v2.3.0, and the OpenWeatherMap API version was updated
 | 
				
			||||||
 | 
					from v3.2.7 to v3.2.8.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					These updates were necessary as DarkSky has been discontinued,
 | 
				
			||||||
 | 
					streamlining the module's functionality. There are no breaking
 | 
				
			||||||
 | 
					changes for current OpenWeatherMap API users.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Additionally, the language handling in the Weather API was
 | 
				
			||||||
 | 
					refactored to replace the experimental `given/when` construct
 | 
				
			||||||
 | 
					with standard `if/elsif` statements for better readability
 | 
				
			||||||
 | 
					and maintainability. This change does not introduce any breaking
 | 
				
			||||||
 | 
					changes and enhances code clarity.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Remove DarkSky API support from Weather module
 | 
				
			||||||
>Tue, 14 Oct 2025 07:35:18 +0200
 | 
					>Tue, 14 Oct 2025 07:35:18 +0200
 | 
				
			||||||
 | 
					
 | 
				
			||||||
>Author: Marko Oldenburg (fhemdevelopment@cooltux.net)
 | 
					>Author: Marko Oldenburg (fhemdevelopment@cooltux.net)
 | 
				
			||||||
@@ -27,7 +77,7 @@ for existing users of the OpenWeatherMap API.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Refactor language handling in Weather API (origin/testing, origin/main, origin/dev, origin/HEAD, testing, main, dev)
 | 
					### Refactor language handling in Weather API
 | 
				
			||||||
>Tue, 14 Oct 2025 07:04:00 +0200
 | 
					>Tue, 14 Oct 2025 07:04:00 +0200
 | 
				
			||||||
 | 
					
 | 
				
			||||||
>Author: Marko Oldenburg (fhemdevelopment@cooltux.net)
 | 
					>Author: Marko Oldenburg (fhemdevelopment@cooltux.net)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -516,7 +516,7 @@ __END__
 | 
				
			|||||||
  ],
 | 
					  ],
 | 
				
			||||||
  "release_status": "stable",
 | 
					  "release_status": "stable",
 | 
				
			||||||
  "license": "GPL_2",
 | 
					  "license": "GPL_2",
 | 
				
			||||||
  "version": "v2.3.0",
 | 
					  "version": "v2.3.1",
 | 
				
			||||||
  "author": [
 | 
					  "author": [
 | 
				
			||||||
    "Marko Oldenburg <fhemdevelopment@cooltux.net>"
 | 
					    "Marko Oldenburg <fhemdevelopment@cooltux.net>"
 | 
				
			||||||
  ],
 | 
					  ],
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
UPD 2025-10-14_07:34:42 24515 FHEM/59_Weather.pm
 | 
					UPD 2025-10-16_18:59:55 24515 FHEM/59_Weather.pm
 | 
				
			||||||
UPD 2025-10-14_07:20:30 34175 lib/FHEM/Core/Weather.pm
 | 
					UPD 2025-10-16_18:59:41 34158 lib/FHEM/Core/Weather.pm
 | 
				
			||||||
UPD 2025-10-14_07:25:36 33545 lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm
 | 
					UPD 2025-10-14_07:39:57 33545 lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm
 | 
				
			||||||
UPD 2025-10-14_07:20:30 38721 lib/FHEM/APIs/Weather/wundergroundAPI.pm
 | 
					UPD 2025-10-14_07:20:30 38721 lib/FHEM/APIs/Weather/wundergroundAPI.pm
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -232,9 +232,6 @@ sub _LanguageInitialize {
 | 
				
			|||||||
        @directions_txt_i18n     = @directions_txt_nl;
 | 
					        @directions_txt_i18n     = @directions_txt_nl;
 | 
				
			||||||
        %pressure_trend_txt_i18n = %pressure_trend_txt_nl;
 | 
					        %pressure_trend_txt_i18n = %pressure_trend_txt_nl;
 | 
				
			||||||
        %status_items_txt_i18n   = %status_items_txt_nl;
 | 
					        %status_items_txt_i18n   = %status_items_txt_nl;
 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    elsif ( $lang eq 'fr' ) {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    elsif ( $lang eq 'fr' ) {
 | 
					    elsif ( $lang eq 'fr' ) {
 | 
				
			||||||
        %wdays_txt_i18n          = %wdays_txt_fr;
 | 
					        %wdays_txt_i18n          = %wdays_txt_fr;
 | 
				
			||||||
@@ -647,13 +644,13 @@ sub Get {
 | 
				
			|||||||
    my $reading = shift @$aRef // return;
 | 
					    my $reading = shift @$aRef // return;
 | 
				
			||||||
    my $value;
 | 
					    my $value;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if ( defined( $hash->{readings}->{$reading} ) ) {
 | 
					    if ( defined( $hash->{READINGS}->{$reading} ) ) {
 | 
				
			||||||
        $value = $hash->{readings}->{$reading}->{VAL};
 | 
					        $value = $hash->{READINGS}->{$reading}->{VAL};
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    else {
 | 
					    else {
 | 
				
			||||||
        my $rt = '';
 | 
					        my $rt = '';
 | 
				
			||||||
        if ( defined( $hash->{readings} ) ) {
 | 
					        if ( defined( $hash->{READINGS} ) ) {
 | 
				
			||||||
            $rt = join( ":noArg ", sort keys %{ $hash->{readings} } );
 | 
					            $rt = join( ":noArg ", sort keys %{ $hash->{READINGS} } );
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return "Unknown reading $reading, choose one of " . $rt;
 | 
					        return "Unknown reading $reading, choose one of " . $rt;
 | 
				
			||||||
@@ -870,11 +867,11 @@ sub Attr {
 | 
				
			|||||||
        ::InternalTimer( gettimeofday() + 0.5,
 | 
					        ::InternalTimer( gettimeofday() + 0.5,
 | 
				
			||||||
            \&FHEM::Core::Weather::DeleteForecastreadings, $hash );
 | 
					            \&FHEM::Core::Weather::DeleteForecastreadings, $hash );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    elsif ('forecastLimit') {
 | 
					    elsif ( $cmd eq 'forecastLimit' ) {
 | 
				
			||||||
        ::InternalTimer( gettimeofday() + 0.5,
 | 
					        ::InternalTimer( gettimeofday() + 0.5,
 | 
				
			||||||
            \&FHEM::Core::Weather::DeleteForecastreadings, $hash );
 | 
					            \&FHEM::Core::Weather::DeleteForecastreadings, $hash );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    elsif ('alerts') {
 | 
					    elsif ( $cmd eq 'alerts' ) {
 | 
				
			||||||
        if ( $cmd eq 'set' ) {
 | 
					        if ( $cmd eq 'set' ) {
 | 
				
			||||||
            $hash->{fhem}->{api}->setAlerts($AttrVal);
 | 
					            $hash->{fhem}->{api}->setAlerts($AttrVal);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@@ -936,8 +933,8 @@ sub WeatherAsHtmlV {
 | 
				
			|||||||
    else {
 | 
					    else {
 | 
				
			||||||
        $fc = (
 | 
					        $fc = (
 | 
				
			||||||
            (
 | 
					            (
 | 
				
			||||||
                defined( $h->{readings}->{fc1_day_of_week} )
 | 
					                defined( $h->{READINGS}->{fc1_day_of_week} )
 | 
				
			||||||
                  && $h->{readings}->{fc1_day_of_week}
 | 
					                  && $h->{READINGS}->{fc1_day_of_week}
 | 
				
			||||||
            ) ? 'fc' : 'hfc'
 | 
					            ) ? 'fc' : 'hfc'
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -953,8 +950,8 @@ sub WeatherAsHtmlV {
 | 
				
			|||||||
    );
 | 
					    );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for ( my $i = 1 ; $i < $items ; $i++ ) {
 | 
					    for ( my $i = 1 ; $i < $items ; $i++ ) {
 | 
				
			||||||
        if ( defined( $h->{readings}->{"${fc}${i}_low_c"} )
 | 
					        if ( defined( $h->{READINGS}->{"${fc}${i}_low_c"} )
 | 
				
			||||||
            && $h->{readings}->{"${fc}${i}_low_c"} )
 | 
					            && $h->{READINGS}->{"${fc}${i}_low_c"} )
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            $ret .= sprintf(
 | 
					            $ret .= sprintf(
 | 
				
			||||||
'<tr><td class="weatherIcon" width=%d>%s</td><td class="weatherValue"><span class="weatherDay">%s: %s</span><br><span class="weatherMin">min %s°C</span> <span class="weatherMax">max %s°C</span><br>%s</td></tr>',
 | 
					'<tr><td class="weatherIcon" width=%d>%s</td><td class="weatherValue"><span class="weatherDay">%s: %s</span><br><span class="weatherMin">min %s°C</span> <span class="weatherMax">max %s°C</span><br>%s</td></tr>',
 | 
				
			||||||
@@ -1024,8 +1021,8 @@ sub WeatherAsHtmlH {
 | 
				
			|||||||
    else {
 | 
					    else {
 | 
				
			||||||
        $fc = (
 | 
					        $fc = (
 | 
				
			||||||
            (
 | 
					            (
 | 
				
			||||||
                defined( $h->{readings}->{fc1_day_of_week} )
 | 
					                defined( $h->{READINGS}->{fc1_day_of_week} )
 | 
				
			||||||
                  && $h->{readings}->{fc1_day_of_week}
 | 
					                  && $h->{READINGS}->{fc1_day_of_week}
 | 
				
			||||||
            ) ? 'fc' : 'hfc'
 | 
					            ) ? 'fc' : 'hfc'
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -1059,8 +1056,8 @@ sub WeatherAsHtmlH {
 | 
				
			|||||||
        ::ReadingsVal( $d, "humidity", "" )
 | 
					        ::ReadingsVal( $d, "humidity", "" )
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
    for ( my $i = 1 ; $i < $items ; $i++ ) {
 | 
					    for ( my $i = 1 ; $i < $items ; $i++ ) {
 | 
				
			||||||
        if ( defined( $h->{readings}->{"${fc}${i}_low_c"} )
 | 
					        if ( defined( $h->{READINGS}->{"${fc}${i}_low_c"} )
 | 
				
			||||||
            && $h->{readings}->{"${fc}${i}_low_c"} )
 | 
					            && $h->{READINGS}->{"${fc}${i}_low_c"} )
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            $ret .= sprintf( '<td class="weatherMin">min %s°C</td>',
 | 
					            $ret .= sprintf( '<td class="weatherMin">min %s°C</td>',
 | 
				
			||||||
                ::ReadingsVal( $d, "${fc}${i}_low_c", " - " ) );
 | 
					                ::ReadingsVal( $d, "${fc}${i}_low_c", " - " ) );
 | 
				
			||||||
@@ -1077,8 +1074,8 @@ sub WeatherAsHtmlH {
 | 
				
			|||||||
    $ret .= sprintf( '<tr><td class="weatherMax">%s</td>',
 | 
					    $ret .= sprintf( '<tr><td class="weatherMax">%s</td>',
 | 
				
			||||||
        ::ReadingsVal( $d, "wind_condition", "" ) );
 | 
					        ::ReadingsVal( $d, "wind_condition", "" ) );
 | 
				
			||||||
    for ( my $i = 1 ; $i < $items ; $i++ ) {
 | 
					    for ( my $i = 1 ; $i < $items ; $i++ ) {
 | 
				
			||||||
        if ( defined( $h->{readings}->{"${fc}${i}_high_c"} )
 | 
					        if ( defined( $h->{READINGS}->{"${fc}${i}_high_c"} )
 | 
				
			||||||
            && $h->{readings}->{"${fc}${i}_high_c"} )
 | 
					            && $h->{READINGS}->{"${fc}${i}_high_c"} )
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            $ret .= sprintf( '<td class="weatherMax">max %s°C</td>',
 | 
					            $ret .= sprintf( '<td class="weatherMax">max %s°C</td>',
 | 
				
			||||||
                ::ReadingsVal( $d, "${fc}${i}_high_c", " - " ) );
 | 
					                ::ReadingsVal( $d, "${fc}${i}_high_c", " - " ) );
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user