cancel
Showing results for 
Search instead for 
Did you mean: 
Replies are disabled for this topic. Start a new one or visit our Help Center.

Trying to write a string to return a value from a device in Google Home Script Editor

Alf_Tupper
Community Member

I have been trying to figure this out for most of today and not getting anywhere fast... Would appreciate it if anyone could help and get me on the right track. I want to switch on my intake fan for my garage based on whether the RH% of the first sensor is greater than the second.

 

Below is what I have so far:

metadata:
  name: Intake Fan On/Off
  description: Intake fan to be on only when sensor 1 RH% is greater than sensor 2 RH%

  starters:
    - type: device.state.HumiditySetting # For devices that support humidity settings such as humidifiers and dehumidifiers.
      device: Workshop Sensor 1 - Workshop
      state: humiditySetpointPercent
      greaterThan:
        [
          ('device.Workshop Sensor 2 - Workshop') 'state.humiditySetpointPercent',
        ]

  actions:
    - type: device.command.OnOff # Turn the device on or off.
      # Whether to turn the device on or off.
      on: true
      devices: Intake Fan - Workshop

 

 I keep getting the error below and I can't work out how to correctly write the string to return a value.

The value should be one of [String, Bool, Number, Temperature, ColorTemperature, DateTime, Time, Weekday, Duration, ColorHex] but is [Array] instead. The expected formats for time string are [HH:MM:SS; HH:MM; HH:MM AM/PM; HH AM/PM; sunrise/sunset]. The expected formats for duration string are [HHhMMm; HHhMMmSSs; HHhoursMMminSSsec; HHhrsMMminutesSSseconds; MMminutes; HHh MMm]. The expected formats for weekday string are [monday; TUESDAY; WED; fri].

0 REPLIES 0