git.graph-it.com
/
graphit
/
controlpi-statemachine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ce0b728
)
Trigger in state change event.
master
author
Benjamin Braatz
<bb@bbraatz.eu>
Wed, 8 Mar 2023 02:27:00 +0000
(
03:27
+0100)
committer
Benjamin Braatz
<bb@bbraatz.eu>
Wed, 8 Mar 2023 02:27:00 +0000
(
03:27
+0100)
controlpi_plugins/statemachine.py
patch
|
blob
|
history
diff --git
a/controlpi_plugins/statemachine.py
b/controlpi_plugins/statemachine.py
index 3c9cd69227d78e20ba9ef1e76c5c9c988ada0f66..5cebe470e1a9b5c5b89b92cc20f6abab0a4549cd 100644
(file)
--- a/
controlpi_plugins/statemachine.py
+++ b/
controlpi_plugins/statemachine.py
@@
-140,7
+140,8
@@
class StateMachine(BasePlugin):
self._state = new_state
await self.bus.send(Message(self.name,
{'event': 'changed',
- 'state': new_state}))
+ 'state': new_state,
+ 'trigger': message}))
commands = []
if 'entry' in self.conf['states'][self._state]:
commands += self.conf['states'][self._state]['entry']