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
This commit is contained in:
Mr-Ker
2023-08-13 21:05:57 +02:00
committed by GitHub
parent 5b6a7edd8d
commit 66b01bee49

View File

@@ -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