|
从作者发布的插件问题里搬运的:
修改以下----
'custom_components/xiaomi_gateway3/device_trigger.py' 'TRIGGER_BASE_SCHEMA' to 'DEVICE_TRIGGER_BASE_SCHEMA'
import voluptuous as vol
-from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA #修改前
+from homeassistant.components.device_automation import DEVICE_TRIGGER_BASE_SCHEMA #修改后
from homeassistant.components.homeassistant.triggers import \
state as state_trigger
from homeassistant.const import *
@@ -10,7 +10,7 @@
from .core import zigbee
from .sensor import BUTTON
-TRIGGER_SCHEMA = TRIGGER_BASE_SCHEMA.extend( #修改前
+TRIGGER_SCHEMA = DEVICE_TRIGGER_BASE_SCHEMA.extend( #修改后
{
vol.Required(CONF_TYPE): cv.string,
vol.Required('action'): cv.string
|
|