Compare commits
	
		
			1 Commits
		
	
	
		
			82d0e6b1b6
			...
			testing
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 437d04b87c | 
@@ -644,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;
 | 
				
			||||||
@@ -933,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'
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -950,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>',
 | 
				
			||||||
@@ -1021,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'
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -1056,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", " - " ) );
 | 
				
			||||||
@@ -1074,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