Skip to content

Commit 337330e

Browse files
committed
fix!: Fix the trigger service schema
BREAKING CHANGE: The trigger service now only accepts output_path and message and require Home Assistant nodes version 0.57.0+
1 parent 3761fbe commit 337330e

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed
+12-11
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
trigger:
2-
description: Trigger a Node-RED Node
2+
name: Trigger a Node-RED Node
3+
description: >
4+
Trigger a Node-RED node.
35
target:
46
entity:
57
integration: nodered
68
domain: switch
79
fields:
8-
trigger_entity_id:
9-
description: Entity Id to trigger the event node with. Only needed if the node is not triggered by a single entity.
10-
example: sun.sun
11-
skip_condition:
12-
description: Skip conditions of the node (defaults to false)
13-
example: true
1410
output_path:
15-
description: Which output of the node to use (defaults to true, the top output). Only used when skip_condition is set to true.
16-
example: true
17-
payload:
18-
description: The payload the node will output when triggered. Works only when triggering an entity node, not an event node.
11+
default: "0"
12+
description: Comma separated list of paths to send the message to. Zero is used to send the message to all paths.
13+
example: "1,2"
14+
selector:
15+
text:
16+
message:
17+
description: The message object that will be sent to the next node.
18+
selector:
19+
object:

custom_components/nodered/switch.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
CONF_MESSAGE,
2424
CONF_OUTPUT_PATH,
2525
CONF_SWITCH,
26-
CONF_TRIGGER_ENTITY_ID,
2726
NODERED_DISCOVERY_NEW,
2827
SERVICE_TRIGGER,
2928
SWITCH_ICON,
@@ -34,9 +33,8 @@
3433
SERVICE_TRIGGER_SCHEMA = vol.Schema(
3534
{
3635
vol.Required(CONF_ENTITY_ID): cv.entity_ids,
37-
vol.Optional(CONF_TRIGGER_ENTITY_ID): cv.entity_id,
38-
vol.Optional(CONF_OUTPUT_PATH): cv.boolean,
39-
vol.Optional(CONF_MESSAGE): vol.Extra,
36+
vol.Optional(CONF_OUTPUT_PATH, default="0"): cv.string,
37+
vol.Optional(CONF_MESSAGE, default={}): dict,
4038
}
4139
)
4240
EVENT_TRIGGER_NODE = "automation_triggered"

0 commit comments

Comments
 (0)