Fix lacrosse view sensor units (#106203)

Fixed Unit values from sensor.py

There was a mistake on the units from the sensor that where messing up the device readings on rain, windchill and feels like sensors
This commit is contained in:
Diogo Alves 2023-12-21 22:28:19 +00:00 committed by GitHub
parent c4c422de79
commit 69f8514556
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -97,7 +97,7 @@ SENSOR_DESCRIPTIONS = {
key="Rain", key="Rain",
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
value_fn=get_value, value_fn=get_value,
native_unit_of_measurement=UnitOfPrecipitationDepth.INCHES, native_unit_of_measurement=UnitOfPrecipitationDepth.MILLIMETERS,
device_class=SensorDeviceClass.PRECIPITATION, device_class=SensorDeviceClass.PRECIPITATION,
), ),
"WindHeading": LaCrosseSensorEntityDescription( "WindHeading": LaCrosseSensorEntityDescription(
@ -130,7 +130,7 @@ SENSOR_DESCRIPTIONS = {
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
value_fn=get_value, value_fn=get_value,
device_class=SensorDeviceClass.TEMPERATURE, device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=UnitOfTemperature.CELSIUS, native_unit_of_measurement=UnitOfTemperature.FAHRENHEIT,
), ),
"WindChill": LaCrosseSensorEntityDescription( "WindChill": LaCrosseSensorEntityDescription(
key="WindChill", key="WindChill",
@ -138,7 +138,7 @@ SENSOR_DESCRIPTIONS = {
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
value_fn=get_value, value_fn=get_value,
device_class=SensorDeviceClass.TEMPERATURE, device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=UnitOfTemperature.CELSIUS, native_unit_of_measurement=UnitOfTemperature.FAHRENHEIT,
), ),
} }