From 66b01bee490f0f7a31769bb956d01728a2f8fa7b Mon Sep 17 00:00:00 2001 From: Mr-Ker <58399419+Mr-Ker@users.noreply.github.com> Date: Sun, 13 Aug 2023 21:05:57 +0200 Subject: [PATCH] Add support for Bosch 2nd Gen Shutter Contact (#98331) Add support for Bosch 2nd Gen SHCShutterContact2 We only need to check for the shutter contact 2 types as both devices provide the same properties that are used by the bosch_shc component. Resolves: #86295 --- homeassistant/components/bosch_shc/binary_sensor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/bosch_shc/binary_sensor.py b/homeassistant/components/bosch_shc/binary_sensor.py index 25ab320a4c4..348bfe80701 100644 --- a/homeassistant/components/bosch_shc/binary_sensor.py +++ b/homeassistant/components/bosch_shc/binary_sensor.py @@ -25,7 +25,9 @@ async def async_setup_entry( entities: list[BinarySensorEntity] = [] session: SHCSession = hass.data[DOMAIN][config_entry.entry_id][DATA_SESSION] - for binary_sensor in session.device_helper.shutter_contacts: + for binary_sensor in ( + session.device_helper.shutter_contacts + session.device_helper.shutter_contacts2 + ): entities.append( ShutterContactSensor( device=binary_sensor, @@ -37,6 +39,7 @@ async def async_setup_entry( for binary_sensor in ( session.device_helper.motion_detectors + session.device_helper.shutter_contacts + + session.device_helper.shutter_contacts2 + session.device_helper.smoke_detectors + session.device_helper.thermostats + session.device_helper.twinguards