From 39f39596575fe063d883943755e7b43049b37fc3 Mon Sep 17 00:00:00 2001 From: Pedro Ribeiro Date: Mon, 20 Nov 2023 22:43:27 +0000 Subject: [PATCH] DuoFern-Sonnen-Windsensor 9499 - Support Windsensor Fixes #93 --- README.md | 2 ++ custom_components/rademacher/binary_sensor.py | 16 ++++++++++++++++ custom_components/rademacher/manifest.json | 4 ++-- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5daa1cf..3a851db 100644 --- a/README.md +++ b/README.md @@ -177,6 +177,8 @@ The integration should work with the following devices (tested devices are marke - Tested on DuoFern 9485 wireless radiator thermostat - **DuoFern Smoke Alarm Device (DN: 32001664)** - Tested on DuoFern 9481 Wireless Smoke detector +- **DuoFern Sun/Wind Sensor (DN:32004464)** + - Tested on DuoFern sun/wind sensor 9499 ## Switches - DuoFern Switch actuator (DN:35001164) diff --git a/custom_components/rademacher/binary_sensor.py b/custom_components/rademacher/binary_sensor.py index 1af7edf..3f3add4 100644 --- a/custom_components/rademacher/binary_sensor.py +++ b/custom_components/rademacher/binary_sensor.py @@ -69,6 +69,22 @@ async def async_setup_entry(hass, config_entry: ConfigEntry, async_add_entities) device_class=BinarySensorDeviceClass.LIGHT, ) ) + if device.has_wind_detection: + _LOGGER.info( + "Found Wind Detection Sensor for Device ID: %s", device.did + ) + new_entities.append( + HomePilotBinarySensorEntity( + coordinator=coordinator, + device=device, + id_suffix="wind_detect", + name_suffix="Wind Detection", + value_attr="wind_detection_value", + device_class=None, + icon_off="mdi:weather-windy", + icon_on="mdi:weather-windy", + ) + ) if device.has_contact_state and device.did not in ternary_contact_sensors: _LOGGER.info("Found Contact Sensor for Device ID: %s", device.did) new_entities.append( diff --git a/custom_components/rademacher/manifest.json b/custom_components/rademacher/manifest.json index 24511f2..804df79 100644 --- a/custom_components/rademacher/manifest.json +++ b/custom_components/rademacher/manifest.json @@ -11,6 +11,6 @@ "integration_type": "hub", "iot_class": "local_polling", "issue_tracker": "https://github.com/peribeir/homeassistant-rademacher/issues", - "requirements": ["pyrademacher==0.11.1"], - "version": "2.0" + "requirements": ["pyrademacher==0.11.2"], + "version": "2.0.1" }