Skip to content

Commit

Permalink
Fix for move EVENT_AUTOMATION_TRIGGERED in HA 0.111.x
Browse files Browse the repository at this point in the history
Closes #28
  • Loading branch information
zachowj committed Jun 10, 2020
1 parent 8bd49b4 commit 5fb6ca2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions custom_components/nodered/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
CONF_ID,
CONF_STATE,
CONF_TYPE,
EVENT_AUTOMATION_TRIGGERED,
EVENT_STATE_CHANGED,
)
from homeassistant.core import callback
Expand Down Expand Up @@ -44,6 +43,7 @@
vol.Optional(CONF_PAYLOAD): vol.Extra,
}
)
EVENT_TRIGGER_NODE = "automation_triggered"


async def async_setup_entry(hass, config_entry, async_add_entities):
Expand Down Expand Up @@ -114,8 +114,7 @@ async def async_trigger_node(self, **kwargs) -> None:

self._connection.send_message(
event_message(
self._message_id,
{CONF_TYPE: EVENT_AUTOMATION_TRIGGERED, CONF_DATA: data},
self._message_id, {CONF_TYPE: EVENT_TRIGGER_NODE, CONF_DATA: data},
)
)

Expand Down

0 comments on commit 5fb6ca2

Please sign in to comment.