Remove get_serial helper that is no longer needed. (#22368)
This commit is contained in:
1 parent
6fa8fdf555
commit
a62c116959
10 files changed
+27
-44
No files matched your search
@@ -3,7 +3,7 @@ import logging
|
||||
|
||||
from homeassistant.components.switch import SwitchDevice
|
||||
|
||||
from . import KNOWN_ACCESSORIES, HomeKitEntity
|
||||
from . import KNOWN_DEVICES, HomeKitEntity
|
||||
|
||||
DEPENDENCIES = ['homekit_controller']
|
||||
|
||||
@@ -15,7 +15,7 @@ _LOGGER = logging.getLogger(__name__)
|
||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
"""Set up Homekit switch support."""
|
||||
if discovery_info is not None:
|
||||
accessory = hass.data[KNOWN_ACCESSORIES][discovery_info['serial']]
|
||||
accessory = hass.data[KNOWN_DEVICES][discovery_info['serial']]
|
||||
add_entities([HomeKitSwitch(accessory, discovery_info)], True)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user