Create property_ids with ActiveMode in LG ThinQ integration (#125638)
* Bump thinqconnect to 0.9.7 * Pass a r/w parameter to get active properties id from the cloud --------- Co-authored-by: jangwon.lee <jangwon.lee@lge.com>pull/125658/head
parent
7eba111704
commit
cb97085e48
|
@ -6,6 +6,7 @@ import logging
|
|||
|
||||
from thinqconnect import DeviceType
|
||||
from thinqconnect.devices.const import Property as ThinQProperty
|
||||
from thinqconnect.integration import ActiveMode
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
BinarySensorEntity,
|
||||
|
@ -91,7 +92,9 @@ async def async_setup_entry(
|
|||
for description in descriptions:
|
||||
entities.extend(
|
||||
ThinQBinarySensorEntity(coordinator, description, property_id)
|
||||
for property_id in coordinator.api.get_active_idx(description.key)
|
||||
for property_id in coordinator.api.get_active_idx(
|
||||
description.key, ActiveMode.READ_ONLY
|
||||
)
|
||||
)
|
||||
|
||||
if entities:
|
||||
|
|
|
@ -7,6 +7,7 @@ from typing import Any
|
|||
|
||||
from thinqconnect import DeviceType
|
||||
from thinqconnect.devices.const import Property as ThinQProperty
|
||||
from thinqconnect.integration import ActiveMode
|
||||
|
||||
from homeassistant.components.switch import (
|
||||
SwitchDeviceClass,
|
||||
|
@ -69,7 +70,9 @@ async def async_setup_entry(
|
|||
for description in descriptions:
|
||||
entities.extend(
|
||||
ThinQSwitchEntity(coordinator, description, property_id)
|
||||
for property_id in coordinator.api.get_active_idx(description.key)
|
||||
for property_id in coordinator.api.get_active_idx(
|
||||
description.key, ActiveMode.READ_WRITE
|
||||
)
|
||||
)
|
||||
|
||||
if entities:
|
||||
|
|
Loading…
Reference in New Issue