07-16-2025 01:29 AM
Hi everyone,
I am trying to start an automation based on the values of two temperature sensors. Let's call them Device A and Device B. I want to get a notification when temperature at Device A is greater than or equal to the temperature at Device B.
Currently, I can only assign fixed values to the greaterThanOrEqualTo field. It would be great if instead I could set this field to the value from another sensor.
See pseudo-code below of what I would like to see working:
metadata:
name: Temperature Alert - Send Notification
description: If Temp A > Temp B, send a notification and turn the lock on.
automations:
- starters:
- type: device.state.TemperatureControl
device: Device A
state: temperatureAmbient
suppressFor: 20hour
greaterThanOrEqualTo:
device: Device B
state: temperatureAmbient
actions:
- type: home.command.Notification
title: Temperature Alert!
body: Temp A > Temp B
In the code above you can see that instead of assigning a fixed value to greaterThanOrEqualTo field, it's defined as a Struct.
Answered! Go to the Recommended Answer.
07-18-2025 12:36 PM
Unfortunately, Google Home Automations Script Editor does not currently support comparing dynamic values between two devices directly, like you're trying to do with greaterThanOrEqualTo referencing another device’s state.
I recommend submitting a feature request via Google Issue Tracker. The more visibility and feedback this feature gets, the more likely it is to be considered in future updates. Please share the issue ID here.
07-20-2025 12:20 PM
Thank you for confirming and for suggesting a bug is created. Just did that. Bug id 433073111 created. Thank you.
07-18-2025 12:36 PM
Unfortunately, Google Home Automations Script Editor does not currently support comparing dynamic values between two devices directly, like you're trying to do with greaterThanOrEqualTo referencing another device’s state.
I recommend submitting a feature request via Google Issue Tracker. The more visibility and feedback this feature gets, the more likely it is to be considered in future updates. Please share the issue ID here.
07-20-2025 12:20 PM
Thank you for confirming and for suggesting a bug is created. Just did that. Bug id 433073111 created. Thank you.