From 73bff4dee5cd80e69e12d9ae38769e3d8cdbd759 Mon Sep 17 00:00:00 2001 From: Daniel Baulig Date: Wed, 29 Jun 2022 08:30:55 -0700 Subject: [PATCH] Expose Envisalink's zone number as an attribute (#71468) Co-authored-by: J. Nick Koston --- homeassistant/components/envisalink/binary_sensor.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/homeassistant/components/envisalink/binary_sensor.py b/homeassistant/components/envisalink/binary_sensor.py index 3fd7daeea86..d82f90aa4f4 100644 --- a/homeassistant/components/envisalink/binary_sensor.py +++ b/homeassistant/components/envisalink/binary_sensor.py @@ -93,6 +93,12 @@ class EnvisalinkBinarySensor(EnvisalinkDevice, BinarySensorEntity): last_trip_time = None attr[ATTR_LAST_TRIP_TIME] = last_trip_time + + # Expose the zone number as an attribute to allow + # for easier entity to zone mapping (e.g. to bypass + # the zone). + attr["zone"] = self._zone_number + return attr @property