Revert changes to platforms using self.device (#16209)

* Revert tank_utility

* Fix Soundtouch

* Fix Plex

* Fix Emby

* Fix Radiotherm

* Fix Juicenet

* Fix Qwikswitch

* Fix Xiaomi miio

* Fix Nest

* Fix Tellduslive

* Fix KNX
This commit is contained in:
Robert Svensson authored and Paulus Schoutsen committed 2018-08-26 21:25:39 +02:00
1 parent 289b1802fd
commit 5341785aae
28 files changed
+256 -237

No files matched your search

+4 -4
View File
@@ -61,13 +61,13 @@ class KNXNotificationService(BaseNotificationService):
def __init__(self, devices):
"""Initialize the service."""
self._devices = devices
self.devices = devices
@property
def targets(self):
"""Return a dictionary of registered targets."""
ret = {}
for device in self._devices:
for device in self.devices:
ret[device.name] = device.name
return ret
@@ -80,11 +80,11 @@ class KNXNotificationService(BaseNotificationService):
async def _async_send_to_all_devices(self, message):
"""Send a notification to knx bus to all connected devices."""
for device in self._devices:
for device in self.devices:
await device.set(message)
async def _async_send_to_device(self, message, names):
"""Send a notification to knx bus to device with given names."""
for device in self._devices:
for device in self.devices:
if device.name in names:
await device.set(message)