Hello @X0mbie,
Using the Rules API is another good option, you just need to use an API test tool, like Postman.
The sample below has this workflow:
- IF the button is pushed
- THEN set a 30-minute timer to turn OFF the TV
{
"name":"If button is pushed, set timer to turn the TV off",
"actions": [
{
"if":{
"equals": {
"left": {
"device": {
"devices": [
"device-id-button"
],
"component": "main",
"capability": "button",
"attribute": "button"
}
},
"right": {
"string": "pushed"
}
},
"then":[
{
"sleep": {
"duration": {
"value": {
"integer": 30
},
"unit": "Minute"
}
}
},
{
"command": {
"devices": [
"device-id-tv"
],
"commands": [
{
"component": "main",
"capability": "switch",
"command": "off"
}
]
}
}
]
}
}
]
}
Complete the rule by placing the device IDs correctly, for more information, check this document.
Let me know if you have any doubts.