From af4b85d39d22b07930f1572520797cd551b26695 Mon Sep 17 00:00:00 2001 From: Jc2k Date: Mon, 25 Mar 2019 01:21:04 +0000 Subject: [PATCH] Give HomeKit locks better names by default (#22333) ## Description: This is a follow up to #22171. There we set the name of an entity based on the `accessory-information` homekit service, rather than using the zeroconf/avahi name metadata. Unfortunately Lock also sets its name from zeroconf directly, rather than picking it up from the base class. This test updates it to be like the other homekit entities and use the base class. (This is from my ongoing homekit_controller configentry branch). ## Checklist: - [x] The code change is tested and works locally. - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass** - [x] There is no commented out code in this PR. --- homeassistant/components/homekit_controller/lock.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/homeassistant/components/homekit_controller/lock.py b/homeassistant/components/homekit_controller/lock.py index a2aac5767bdf61..b084d7525d3b48 100644 --- a/homeassistant/components/homekit_controller/lock.py +++ b/homeassistant/components/homekit_controller/lock.py @@ -41,7 +41,6 @@ def __init__(self, accessory, discovery_info): """Initialise the Lock.""" super().__init__(accessory, discovery_info) self._state = None - self._name = discovery_info['model'] self._battery_level = None def get_characteristic_types(self): @@ -60,11 +59,6 @@ def _update_lock_mechanism_current_state(self, value): def _update_battery_level(self, value): self._battery_level = value - @property - def name(self): - """Return the name of this device.""" - return self._name - @property def is_locked(self): """Return true if device is locked."""