Hello @Vinlo,
The Rules API is another option, in the time properties such as sleep you can use bigger units like Hour or Day.
The example below describes this workflow:
- IF the location mode changes to Away
- THEN wait for 1 hour and check IF the location mode is still Away.
- IF so, THEN change the location mode to Vacation.
{
"name":"Change Location mode after x hours",
"actions":[
{
"if":{
"equals":{
"left":{
"location":{
"attribute":"mode"
}
},
"right":{
"string":"away-mode-ID"
}
},
"then":[
{
"sleep":{
"duration":{
"value":{
"integer":1
},
"unit":"Hour"
}
}
},
{
"if":{
"equals":{
"left":{
"location":{
"attribute":"mode"
}
},
"right":{
"string":"away-mode-ID"
}
},
"then":[
{
"location":{
"mode":"vacation-mode-ID"
}
}
]
}
}
]
}
}
]
}
This rule needs the location mode IDs, to get those values, take a look at this post.
In the API documentation, you can find more information about the Rules’ syntax. Refer to this post for the instructions to install a rule.
If one of the previous posts answered your question, would you please mark it as solved? If you still have doubts or issues, let me know what’s going on and I can dig in further.