mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 22:57:17 +00:00
Adjust
This commit is contained in:
parent
b78a752047
commit
14dbd2ecf8
@ -154,12 +154,15 @@ async def async_setup_entry(hass: HomeAssistant, entry: TuyaConfigEntry) -> bool
|
|||||||
device_registry = dr.async_get(hass)
|
device_registry = dr.async_get(hass)
|
||||||
for device in manager.device_map.values():
|
for device in manager.device_map.values():
|
||||||
if not device.status and not device.status_range and not device.function:
|
if not device.status and not device.status_range and not device.function:
|
||||||
# If the device has no status, status_range or function, it cannot be supported
|
# If the device has no status, status_range or function,
|
||||||
|
# it cannot be supported
|
||||||
LOGGER.info(
|
LOGGER.info(
|
||||||
"Device %s (%s) has been ignored as it does not provide any DPCode"
|
"Device %s (%s) has been ignored as it does not provide any"
|
||||||
" (status, status_range and function are all empty)",
|
" standard instructions (status, status_range and function are"
|
||||||
|
" all empty) - see %s",
|
||||||
device.product_name,
|
device.product_name,
|
||||||
device.id,
|
device.id,
|
||||||
|
"https://github.com/tuya/tuya-device-sharing-sdk/issues/11",
|
||||||
)
|
)
|
||||||
device_registry.async_get_or_create(
|
device_registry.async_get_or_create(
|
||||||
config_entry_id=entry.entry_id,
|
config_entry_id=entry.entry_id,
|
||||||
|
@ -43,6 +43,7 @@ async def test_unsupported_device(
|
|||||||
# Information log entry added
|
# Information log entry added
|
||||||
assert (
|
assert (
|
||||||
"Device DOLCECLIMA 10 HP WIFI (mock_device_id) has been ignored"
|
"Device DOLCECLIMA 10 HP WIFI (mock_device_id) has been ignored"
|
||||||
" as it does not provide any DPCode (status, status_range and function"
|
" as it does not provide any standard instructions (status, status_range"
|
||||||
" are all empty)" in caplog.text
|
" and function are all empty) - see "
|
||||||
|
"https://github.com/tuya/tuya-device-sharing-sdk/issues/11" in caplog.text
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user