cancel
Showing results for 
Search instead for 
Did you mean: 

Starter check met, condition check not

JerryFr
Community Member

I want to use the Condition: of my Google TV On/Off state in Google Home Scripts.

So I have this code:

automations:
   starters:
      - type: device.state.OnOff
        device: Panasonic TV - Lounge
        state: on
        is: false

   condition:
      device: Panasonic TV - Lounge
      type: device.state.OnOff
              state: on
              is: false

When it is run, I find in the log:

  Automation check: conditions not met.
  Starter check: conditions met.

So why is this, i.e. the check is OK to allow the script to run, but the same condition is not met in the script?

1 Recommended Answer

Thanks for clarification. You can skip/remove the condition part since turning off TV in the starter block would trigger light(s) to go off.

Can you please try the below script and let me if that worked for you:

metadata:
name: TVoffLightoff
description: Light goes off if TV is off

automations:
starters:
- type: device.state.OnOff
state: on
is: false
device: TV - Family Room

actions:
- type: device.command.OnOff
on: false
devices: Light - Family Room

View Recommended Answer in original post

4 REPLIES 4

armen_dpe
Solutions Expert
Solutions Expert

Can you give us more details about this home script? What you are trying to achieve with it?

I want to use the

condition:
      device: Panasonic TV - Lounge
      type: device.state.OnOff
              state: on
              is: false

in other scripts, e.g. turn off lights if (condition) TV is off

Thanks for clarification. You can skip/remove the condition part since turning off TV in the starter block would trigger light(s) to go off.

Can you please try the below script and let me if that worked for you:

metadata:
name: TVoffLightoff
description: Light goes off if TV is off

automations:
starters:
- type: device.state.OnOff
state: on
is: false
device: TV - Family Room

actions:
- type: device.command.OnOff
on: false
devices: Light - Family Room

I will test your suggestion soon.

But I already have two Starters, -type: device.state.OnOff, and -type: time.schedule(s).

I wish to retain those, hence a Condition seemed the obvious solution.