-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SendTo] add ability to nest one SendTo command into another #5232
base: mega
Are you sure you want to change the base?
Conversation
This will break the 'default argument' operator.
|
If you need to do stuff like that, I suggest you add some rule on the other node and then send an event on what to do with it. I guess we could add some escape token at some point, but that will still lead to issues as it needs to know in advance how many 'hops' are required and thus how many levels of escape. |
S**t.. i totally forgot about this. Can i go with this?: |
Nope, as that's a totally unintuitive character. Better look into adding a
Maybe others too. |
true... but it is for easyfetch. Where i could simply add a button (e.g. SwitchRoom1&5G12) where 5 is the node number and 12 the GPIO. It sends then a GPIOToggle,12 and also does poll the pinstate constantly. I wouldn`t be necessary anymore to put extra code on the remote node. |
I was also thinking about adding something like |
Still I wonder how intuitive it is to setup as ESPEasyFetch must know about node 9 and 8 in your example.
A bit like a separate quote type which is then used by the parser to consider that block to be parsed already and just remove those quotes? |
In this example we are on node 9 sending a
Maybe, yes... but I realise that any other approach adds a lot more code, which I wanted to avoid to keep the changes for easyfetch as small as possible. Edit: I am already using this on easy2ntfy since the there is no nesting necessary as there is the gateway to ask the nodes |
We recently added an escape character to postpone variable expansion in #5097 |
Exactly ;) |
See here:
https://www.letscontrolit.com/forum/viewtopic.php?p=67939
I admit it is a bit of a hack and probably not the most intuitive approach, but first of all it works and it does so with the least amount of additional code.
example command:
SendTo,8,'SendTo,9,"taskvalueset,5,1,|Plugin#GPIO#Pinstate#16]"'