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:
1 parent
289b1802fd
commit
5341785aae
28 files changed
+256
-237
No files matched your search
@@ -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)
|
||||
Reference in new issue
Block a user