Просмотр исходного кода

async_inferred_type is a method not a property.

Jason Rumney 4 лет назад
Родитель
Сommit
78e6d85cbe
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      custom_components/tuya_local/__init__.py

+ 1 - 1
custom_components/tuya_local/__init__.py

@@ -56,7 +56,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
     device = setup_device(hass, config)
 
     if config[CONF_TYPE] == CONF_TYPE_AUTO:
-        config[CONF_TYPE] = await device.async_inferred_type
+        config[CONF_TYPE] = await device.async_inferred_type()
         if config[CONF_TYPE] is None:
             raise ValueError(f"Unable to detect type for device {device.name}")
         entry.data[CONF_TYPE] = config[CONF_TYPE]