diff --git a/custom_components/sws12500/sensors_weather.py b/custom_components/sws12500/sensors_weather.py index 9e74d23..103ceb6 100644 --- a/custom_components/sws12500/sensors_weather.py +++ b/custom_components/sws12500/sensors_weather.py @@ -137,10 +137,10 @@ SENSOR_TYPES_WEATHER_API: tuple[WeatherSensorEntityDescription, ...] = ( ), WeatherSensorEntityDescription( key=RAIN, - native_unit_of_measurement=UnitOfPrecipitationDepth.INCHES, - device_class=SensorDeviceClass.PRECIPITATION, - state_class=SensorStateClass.TOTAL, - suggested_unit_of_measurement=UnitOfPrecipitationDepth.MILLIMETERS, + native_unit_of_measurement=UnitOfVolumetricFlux.INCHES_PER_HOUR, + device_class=SensorDeviceClass.PRECIPITATION_INTENSITY, + state_class=SensorStateClass.MEASUREMENT, + suggested_unit_of_measurement=UnitOfVolumetricFlux.MILLIMETERS_PER_HOUR, suggested_display_precision=2, icon="mdi:weather-pouring", translation_key=RAIN, @@ -148,10 +148,10 @@ SENSOR_TYPES_WEATHER_API: tuple[WeatherSensorEntityDescription, ...] = ( ), WeatherSensorEntityDescription( key=DAILY_RAIN, - native_unit_of_measurement=UnitOfVolumetricFlux.INCHES_PER_DAY, + native_unit_of_measurement=UnitOfPrecipitationDepth.INCHES, state_class=SensorStateClass.MEASUREMENT, - device_class=SensorDeviceClass.PRECIPITATION_INTENSITY, - suggested_unit_of_measurement=UnitOfVolumetricFlux.MILLIMETERS_PER_DAY, + device_class=SensorDeviceClass.PRECIPITATION, + suggested_unit_of_measurement=UnitOfPrecipitationDepth.MILLIMETERS, suggested_display_precision=2, icon="mdi:weather-pouring", translation_key=DAILY_RAIN,