Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

59 weather fix wind label #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions fhem/FHEM/59_Weather.pm
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ my %wdays_txt_nl = ('Mon' => 'Maa', 'Tue' => 'Din', 'Wed'=> 'Woe', 'Thu' => 'Don
my %wdays_txt_fr= ('Mon' => 'Lun', 'Tue' => 'Mar', 'Wed'=> 'Mer', 'Thu' => 'Jeu', 'Fri' => 'Ven', 'Sat' => 'Sam', 'Sun' => 'Dim');
my %wdays_txt_pl = ('Mon' => 'Pon', 'Tue' => 'Wt', 'Wed'=> 'Śr', 'Thu' => 'Czw', 'Fri' => 'Pt', 'Sat' => 'Sob', 'Sun' => 'Nie');

my %wind_txt = ( 'en' => 'Wind', 'de' => 'Wind', 'nl' => 'Wind', 'fr' => 'Vent', 'pl' => 'Wiatr' );

my @iconlist = (
'storm', 'storm', 'storm', 'thunderstorm', 'thunderstorm', 'rainsnow',
'sleet', 'snow', 'drizzle', 'drizzle', 'icy' ,'chance_of_rain',
Expand Down Expand Up @@ -176,6 +178,7 @@ sub Weather_RetrieveDataFinished($$$) {
my %wdays_txt_i18n;
my @directions_txt_i18n;
my %pressure_trend_txt_i18n;
my $wind_txt_i18n = %wind_txt{$lang};

if($lang eq "de") {
%wdays_txt_i18n= %wdays_txt_de;
Expand All @@ -197,6 +200,7 @@ sub Weather_RetrieveDataFinished($$$) {
%wdays_txt_i18n= %wdays_txt_en;
@directions_txt_i18n= @directions_txt_en;
%pressure_trend_txt_i18n= %pressure_trend_txt_en;
$wind_txt_i18n = @wind_txt{'en'};
}
my @YahooCodes_i18n= YahooWeatherAPI_getYahooCodes($lang);

Expand Down Expand Up @@ -243,7 +247,7 @@ sub Weather_RetrieveDataFinished($$$) {
my $winddir= $data->{wind}{direction};
readingsBulkUpdate($hash, "wind_direction", $winddir);
my $wdir= degrees_to_direction($winddir, @directions_txt_i18n);
readingsBulkUpdate($hash, "wind_condition", "Wind: $wdir $windspeed km/h");
readingsBulkUpdate($hash, "wind_condition", "$wind_txt_i18n: $wdir $windspeed km/h");

# atmosphere
my $humidity= $data->{atmosphere}{humidity};
Expand Down Expand Up @@ -832,4 +836,4 @@ WeatherAsHtmlD($;$)
</ul>

=end html_DE
=cut
=cut
2 changes: 1 addition & 1 deletion fhem/FHEM/YahooWeatherAPI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ my @YahooCodes_fr = (
'agréable', #day
'pluie et grêle',
'chaud', 'orages isolés', 'tempêtes éparses', 'orages épars', 'averses éparses', 'tempête de neige',
'chûtes de neiges éparses', 'tempêtes de neige', 'partielement nuageux', 'averses orageuses', 'chûte de neige', 'chûtes de neige isolées');
'chûtes de neiges éparses', 'tempêtes de neige', 'partiellement nuageux', 'averses orageuses', 'chûte de neige', 'chûtes de neige isolées');

my @YahooCodes_pl = (
'tornado', 'burza tropikalna', 'huragan', 'porywiste burze', 'burze', 'deszcz ze śniegiem',
Expand Down