asantaga / wiserHomeAssistantPlatform

Platform and related climate/sensors to support the Drayton Wiser Home Heating System
MIT License
239 stars 44 forks source link

Add support for Temperature Humidity Sensor (thresholdsensors) (hub v2) #531

Open LGO44 opened 1 day ago

LGO44 commented 1 day ago

Temperature Humidity sensor represent an alternative to the roomstat (cost effective)

Device level image

ThresholdSensor:

image

My result image

A wiser TemperatureHumiditySensor generate 2 threshold sensors.

aioWiserHeatAPI: file threshold_sensor.py threshold_sensor.zip

I create the temperature sensor but not the humidity one

extract of sensor.py of the wiserHomeAssistantPlatform _ # Add a sensor temperature for temperature humidity sensor if data.wiserhub.devices.threshold_sensors: _LOGGER.debug( f" Setting up TemperatureHumidity sensor {data.wiserhub.devices.threshold_sensors.count} LTS Temperature sensors" ) for threshold_sensor in data.wiserhub.devices.threshold_sensors.all: _LOGGER.debug( f" Setting up {threshold_sensor.quantity} {threshold_sensor.device_id} {threshold_sensor.threshold_id} LTS Temperature sensors" ) if threshold_sensor.quantity == "Temperature":
wiser_sensors.extend( [ WiserLTSTempSensor(data, threshold_sensor.id, sensor_type="temperaturehumidity_temp"), WiserThresholdSensor(data, threshold_sensor.id, ) , ]
) elif threshold_sensor.quantity == "Humidity":
wiser_sensors.extend( [ WiserLTSHumiditySensor(data, threshold_sensor.id,sensor_type="temperaturehumidity_humidity"), WiserThresholdSensor(data, thresholdsensor.id, )
] )

msp1974 commented 8 hours ago

Good catch and thanks for the code