Expose Envisalink's zone number as an attribute (#71468)

Co-authored-by: J. Nick Koston <nick@koston.org>
pull/74180/head
Daniel Baulig 2022-06-29 08:30:55 -07:00 committed by GitHub
parent 97dcfe4445
commit 73bff4dee5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

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