Eliminate needless async_add_job invocation of async_add_devices (#6864)
This commit is contained in:
parent
f4d2ece2fe
commit
c27a526f5b
4 changed files with 4 additions and 4 deletions
|
@ -32,7 +32,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
|
||||||
InsteonPLMBinarySensorDevice(hass, plm, address, name)
|
InsteonPLMBinarySensorDevice(hass, plm, address, name)
|
||||||
)
|
)
|
||||||
|
|
||||||
hass.async_add_job(async_add_devices(device_list))
|
async_add_devices(device_list)
|
||||||
|
|
||||||
|
|
||||||
class InsteonPLMBinarySensorDevice(BinarySensorDevice):
|
class InsteonPLMBinarySensorDevice(BinarySensorDevice):
|
||||||
|
|
|
@ -36,7 +36,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
|
||||||
InsteonPLMDimmerDevice(hass, plm, address, name, dimmable)
|
InsteonPLMDimmerDevice(hass, plm, address, name, dimmable)
|
||||||
)
|
)
|
||||||
|
|
||||||
hass.async_add_job(async_add_devices(device_list))
|
async_add_devices(device_list)
|
||||||
|
|
||||||
|
|
||||||
class InsteonPLMDimmerDevice(Light):
|
class InsteonPLMDimmerDevice(Light):
|
||||||
|
|
|
@ -95,7 +95,7 @@ class LIFXManager(object):
|
||||||
entity = LIFXLight(device)
|
entity = LIFXLight(device)
|
||||||
_LOGGER.debug("%s register READY", entity.ipaddr)
|
_LOGGER.debug("%s register READY", entity.ipaddr)
|
||||||
self.entities[device.mac_addr] = entity
|
self.entities[device.mac_addr] = entity
|
||||||
self.hass.async_add_job(self.async_add_devices, [entity])
|
self.async_add_devices([entity])
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def unregister(self, device):
|
def unregister(self, device):
|
||||||
|
|
|
@ -32,7 +32,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
|
||||||
InsteonPLMSwitchDevice(hass, plm, address, name)
|
InsteonPLMSwitchDevice(hass, plm, address, name)
|
||||||
)
|
)
|
||||||
|
|
||||||
hass.async_add_job(async_add_devices(device_list))
|
async_add_devices(device_list)
|
||||||
|
|
||||||
|
|
||||||
class InsteonPLMSwitchDevice(SwitchDevice):
|
class InsteonPLMSwitchDevice(SwitchDevice):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue