From 827fb71e25ae29c750e8950c9d03a95ba5a0feb4 Mon Sep 17 00:00:00 2001 From: schizza Date: Thu, 21 Aug 2025 16:39:05 +0200 Subject: [PATCH] sensors_wslink updated to stable version Updating to stable version, retaining CH3 sensors. Left outside battery unchanged. Will work on bug in next commit. --- custom_components/sws12500/sensors_wslink.py | 38 ++++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/custom_components/sws12500/sensors_wslink.py b/custom_components/sws12500/sensors_wslink.py index d808564..0ef59ac 100644 --- a/custom_components/sws12500/sensors_wslink.py +++ b/custom_components/sws12500/sensors_wslink.py @@ -244,25 +244,25 @@ SENSOR_TYPES_WSLINK: tuple[WeatherSensorEntityDescription, ...] = ( translation_key=CH2_HUMIDITY, value_fn=lambda data: cast("int", data), ), - # WeatherSensorEntityDescription( - # key=CH3_TEMP, - # native_unit_of_measurement=UnitOfTemperature.FAHRENHEIT, - # state_class=SensorStateClass.MEASUREMENT, - # device_class=SensorDeviceClass.TEMPERATURE, - # suggested_unit_of_measurement=UnitOfTemperature.CELSIUS, - # icon="mdi:weather-sunny", - # translation_key=CH3_TEMP, - # value_fn=lambda data: cast(float, data), - # ), - # WeatherSensorEntityDescription( - # key=CH3_HUMIDITY, - # native_unit_of_measurement=PERCENTAGE, - # state_class=SensorStateClass.MEASUREMENT, - # device_class=SensorDeviceClass.HUMIDITY, - # icon="mdi:weather-sunny", - # translation_key=CH3_HUMIDITY, - # value_fn=lambda data: cast(int, data), - # ), + WeatherSensorEntityDescription( + key=CH3_TEMP, + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + state_class=SensorStateClass.MEASUREMENT, + device_class=SensorDeviceClass.TEMPERATURE, + suggested_unit_of_measurement=UnitOfTemperature.CELSIUS, + icon="mdi:weather-sunny", + translation_key=CH3_TEMP, + value_fn=lambda data: cast(float, data), + ), + WeatherSensorEntityDescription( + key=CH3_HUMIDITY, + native_unit_of_measurement=PERCENTAGE, + state_class=SensorStateClass.MEASUREMENT, + device_class=SensorDeviceClass.HUMIDITY, + icon="mdi:weather-sunny", + translation_key=CH3_HUMIDITY, + value_fn=lambda data: cast(int, data), + ), # WeatherSensorEntityDescription( # key=CH4_TEMP, # native_unit_of_measurement=UnitOfTemperature.FAHRENHEIT,