mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-08 07:24:21 +00:00
98_openweathermap - added utf8 conversion for station name
git-svn-id: https://svn.fhem.de/fhem/trunk@5500 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
2929e7df09
commit
72b3ae148c
@ -434,7 +434,7 @@ sub UpdateReadings($$$){
|
||||
readingsBulkUpdate($hash, $prefix."sunrise", $jsonWeather->{city}{sun}{rise});
|
||||
readingsBulkUpdate($hash, $prefix."sunset", $jsonWeather->{city}{sun}{set});
|
||||
readingsBulkUpdate($hash, $prefix."stationId", $jsonWeather->{city}{id});
|
||||
readingsBulkUpdate($hash, $prefix."stationName", $jsonWeather->{city}{name});
|
||||
readingsBulkUpdate($hash, $prefix."stationName", utf8ToLatin1($jsonWeather->{city}{name}));
|
||||
readingsBulkUpdate($hash, $prefix."stationCountry", $jsonWeather->{city}{country});
|
||||
readingsBulkUpdate($hash, $prefix."stationLat", sprintf("%.4f",$jsonWeather->{city}{coord}{lat}));
|
||||
readingsBulkUpdate($hash, $prefix."stationLon", sprintf("%.4f",$jsonWeather->{city}{coord}{lon}));
|
||||
@ -479,7 +479,7 @@ sub UpdateReadings($$$){
|
||||
readingsBulkUpdate($hash, "_decodedWith", "JSON");
|
||||
readingsBulkUpdate($hash, $prefix."stationId", $jsonWeather->{id});
|
||||
readingsBulkUpdate($hash, $prefix."lastRxCode", $jsonWeather->{cod});
|
||||
readingsBulkUpdate($hash, $prefix."stationName", $jsonWeather->{name});
|
||||
readingsBulkUpdate($hash, $prefix."stationName", utf8ToLatin1($jsonWeather->{name}));
|
||||
readingsBulkUpdate($hash, $prefix."humidity", $jsonWeather->{main}{humidity});
|
||||
readingsBulkUpdate($hash, $prefix."pressureAbs", $jsonWeather->{main}{pressure});
|
||||
readingsBulkUpdate($hash, $prefix."pressureRel", $jsonWeather->{main}{sea_level});
|
||||
|
Loading…
x
Reference in New Issue
Block a user