You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update InfluxDB 2.x to 2.7.3, Update Neopixel Change Color Action to work with Neopixel Function, Add Actions: Neopixel Flashing On and Neopixel Flashing Off (#1353)
'message': 'Change the color of an LED in a Neopixel LED strip. Select the Neopixel LED Strip Output.',
25
+
'message': 'Change the color of an LED in a Neopixel LED strip. Select the Neopixel LED Strip Controller, pixel number, and color.',
24
26
25
27
'usage': 'Executing <strong>self.run_action("ACTION_ID")</strong> will set the selected LED to the selected Color. '
26
-
'Executing <strong>self.run_action("ACTION_ID", value={"output_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b", "led": 0, "color": "10, 10, 0"})</strong> will set the color of the specified LED for the Neopixel LED Strip Output with the specified ID. Don\'t forget to change the output_id value to an actual Output ID that exists in your system.',
28
+
'Executing <strong>self.run_action("ACTION_ID", value={"controller_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b", "led": 0, "color": "10, 10, 0"})</strong> will set the color of the specified LED for the Neopixel LED Strip Controller with the specified ID. Don\'t forget to change the controller_id value to an actual Controller ID that exists in your system.',
27
29
28
30
'custom_options': [
29
31
{
30
32
'id': 'controller',
31
33
'type': 'select_device',
32
34
'default_value': '',
33
35
'options_select': [
36
+
'Function',
34
37
'Output'
35
38
],
36
39
'name': lazy_gettext('Controller'),
37
-
'phrase': 'Select the energy meter Input'
40
+
'phrase': 'Select the controller that modulates your neopixels'
38
41
},
39
42
{
40
43
'id': 'led_number',
@@ -50,7 +53,7 @@
50
53
'default_value': '10, 0, 0',
51
54
'required': True,
52
55
'name': 'RGB Color',
53
-
'phrase': 'The color in RGB format, each from 0 to 255 (e.g "10, 0 0")'
56
+
'phrase': 'The color in RGB format, each from 0 to 255 (e.g "10, 0, 0")'
54
57
},
55
58
]
56
59
}
@@ -77,20 +80,29 @@ def initialize(self):
77
80
self.action_setup=True
78
81
79
82
defrun_action(self, dict_vars):
83
+
controller_id=self.controller_id
84
+
led_number=self.led_number
85
+
led_color=self.led_color
86
+
80
87
try:
81
-
controller_id=dict_vars["value"]["output_id"]
88
+
controller_id=dict_vars["value"]["output_id"]# From previous version of this Action. Keep for backwards-compatibility
'message': 'Stop flashing an LED in a Neopixel LED strip. Select the Neopixel LED Strip Controller and pixel number.',
25
+
26
+
'usage': 'Executing <strong>self.run_action("ACTION_ID")</strong> will set the selected LED to the selected Color. '
27
+
'Executing <strong>self.run_action("ACTION_ID", value={"controller_id": "959019d1-c1fa-41fe-a554-7be3366a9c5b", "led": 0})</strong> will stop flashing the specified LED for the Neopixel LED Strip Controller with the specified ID. Don\'t forget to change the controller_id value to an actual Controller ID that exists in your system.',
28
+
29
+
'custom_options': [
30
+
{
31
+
'id': 'controller',
32
+
'type': 'select_device',
33
+
'default_value': '',
34
+
'options_select': [
35
+
'Function'
36
+
],
37
+
'name': lazy_gettext('Controller'),
38
+
'phrase': 'Select the controller that modulates your neopixels'
0 commit comments