01-01-2024 02:37 PM
In google home I cant find how to make a socket turn on for 2 hours with only one automatization.... I always have to make one at 7pm for ON and other at 9PM for OFF.. can I make this in only one???
In Tuya app you can do this but can't find this in Google.home.
01-04-2024 12:17 AM
Within Script Editor you can run multiple starters each with their own conditions and actions.
In that one script you would create a section to turn on the socket and another section to turn it off based off the schedule you want, .
For example this is from the script I wrote that controls the gaming elements in my apt.
metadata:
name: Gaming 2.0
description: Controlling Xbox Series X on on or off via controller position. Control lights by TOD.
automations:
#---
# Turn on Xbox Series X
#---
- starters:
- type: device.state.OpenClose
state: openPercent
is: 100
device: AQCS-Xbox-Elite - Gaming
actions:
- type: device.command.OnOff
on: true
devices: xbx - Gaming
#---
# Turn on Gaming Lights, turn off other lights
#---
- starters:
- type: device.state.OnOff
state: on
is: true
device: xbx - Gaming
condition:
type: time.between
before: sunrise
after: sunset
actions:
- type: device.command.OnOff
on: true
devices:
- TV Backlights - Gaming
- Glide Hexa - Living Room
- type: device.command.OnOff
on: false
devices:
- Fabric Lamp - Kitchen
- Glide - Front door
- Desk String - Desk Front
- Desk Neon - Desk Front