mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Allow qwikswitch sensors as part of devices (#14454)
This commit is contained in:
parent
8ae3caa292
commit
6b9c65c9ce
@ -150,8 +150,10 @@ async def async_setup(hass, config):
|
||||
comps = {'switch': [], 'light': [], 'sensor': [], 'binary_sensor': []}
|
||||
|
||||
try:
|
||||
sensor_ids = []
|
||||
for sens in sensors:
|
||||
_, _type = SENSORS[sens['type']]
|
||||
sensor_ids.append(sens['id'])
|
||||
if _type is bool:
|
||||
comps['binary_sensor'].append(sens)
|
||||
continue
|
||||
@ -192,9 +194,7 @@ async def async_setup(hass, config):
|
||||
'qwikswitch.button.{}'.format(qspacket[QS_ID]), qspacket)
|
||||
return
|
||||
|
||||
if qspacket[QS_ID] not in qsusb.devices:
|
||||
# Not a standard device in, component can handle packet
|
||||
# i.e. sensors
|
||||
if qspacket[QS_ID] in sensor_ids:
|
||||
_LOGGER.debug("Dispatch %s ((%s))", qspacket[QS_ID], qspacket)
|
||||
hass.helpers.dispatcher.async_dispatcher_send(
|
||||
qspacket[QS_ID], qspacket)
|
||||
|
Loading…
x
Reference in New Issue
Block a user