<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Trying to write a string to return a value from a device in Google Home Script Editor in Apps / Account</title>
    <link>https://www.googlenestcommunity.com/t5/Apps-Account/Trying-to-write-a-string-to-return-a-value-from-a-device-in-Google-Home/m-p/604999#M28799</link>
    <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is what I have so far:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;I&amp;nbsp;&lt;/SPAN&gt;keep getting the error below and I can't work out how to correctly write the string to return a value.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;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].&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Mon, 11 Mar 2024 10:03:40 GMT</pubDate>
    <dc:creator>Alf_Tupper</dc:creator>
    <dc:date>2024-03-11T10:03:40Z</dc:date>
    <item>
      <title>Trying to write a string to return a value from a device in Google Home Script Editor</title>
      <link>https://www.googlenestcommunity.com/t5/Apps-Account/Trying-to-write-a-string-to-return-a-value-from-a-device-in-Google-Home/m-p/604999#M28799</link>
      <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is what I have so far:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;I&amp;nbsp;&lt;/SPAN&gt;keep getting the error below and I can't work out how to correctly write the string to return a value.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;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].&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Mon, 11 Mar 2024 10:03:40 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Apps-Account/Trying-to-write-a-string-to-return-a-value-from-a-device-in-Google-Home/m-p/604999#M28799</guid>
      <dc:creator>Alf_Tupper</dc:creator>
      <dc:date>2024-03-11T10:03:40Z</dc:date>
    </item>
  </channel>
</rss>

