Hi,
is it possible to change the xAttributeOptions of a VariablesDevice by API?
I just want to change "hidden" : true from true to false and vice versa. I want to use it for the following configuration of a tasker alarm:
{
"variables": [
{
"name": "state",
"expression": "$alarm_status",
"discrete": false,
"acronym": "Status"
},
{
"name": "day",
"expression": "$alarm_day",
"discrete": true,
"acronym": "Tag"
},
{
"name": "time",
"expression": "$alarm_time",
"type": "string",
"acronym": "Uhr",
"unit": "Uhr",
"discrete": true
}
],
"xAttributeOptions": [
{
"name": "day",
"hidden": true
},
{
"name": "time",
"hidden": true
}
],
"id": "wecker",
"name": "⏰ Wecker",
"class": "VariablesDevice"
},
perhaps it is something like this is possible?
@mwittig said in Execute a rule by another rule:
@temp You need to escape
"
and{
characters with backslashexecute "curl -X PATCH --silent --header 'Content-Type:application/json' --data '\{\"rule\": \{\"active\" :\"true\"}}' --user 'user:password' http://url:5001/api/rules/rule_id"
I have tested this and rule actication works as expected, however, different to what Oliver stated in https://forum.pimatic.org/topic/310/execute-rule-through-api the rule is not executed. I am sorry about this. I’ll make a note on the ticket.
EDIT: The button press via API may another thing to try. See https://forum.pimatic.org/topic/327/press-button-via-api
Thank you