diff --git a/aiocloudweather/station.py b/aiocloudweather/station.py index 9cf3155..703daa8 100644 --- a/aiocloudweather/station.py +++ b/aiocloudweather/station.py @@ -36,8 +36,8 @@ class WeatherstationVendor(Enum): """The weather station cloud vendor.""" - WUNDERGROUND = "wunderground" - WEATHERCLOUD = "weathercloud" + WUNDERGROUND = "Weather Underground" + WEATHERCLOUD = "Weathercloud.net" @dataclass @@ -292,7 +292,7 @@ def from_wunderground(data: WundergroundRawSensor) -> "WeatherStation": else f"{sensor_field.name}raw" ) sensor_data[field_name] = Sensor( - name=sensor_field.name, + name=field_name, metric=value, metric_unit=unit, imperial=value, @@ -333,9 +333,9 @@ def from_weathercloud(data: WeathercloudRawSensor) -> "WeatherStation": conversion_func = METRIC_TO_IMPERIAL.get(unit) if conversion_func: - value = float(value) / 10 # All values are shifted by 10 + value: float = float(value) / 10 # All values are shifted by 10 try: - converted_value = conversion_func(float(value)) + converted_value = conversion_func(value) except TypeError as e: _LOGGER.error( "Failed to convert %s from %s to %s: %s -> %s",