Variables for Rules and Dashboards!

Examples

This enables some really neat capabilities in rules - here’s a few examples:

  • Set a $volumeLevel variable from a dashboard and have it set the volume level of multiple speakers to the new level
  • When motion is detected, take a snapshot of the current dim level, change to a desired level, then reset the light back to the ‘snapshot’ level
  • Use a true/false variable as a condition for determining if a static value or a stored variable should be used for setting the dim level
    • eg. IF $isPartyMode THEN setVolume($partyLevel) ELSE setVolume(5)
  • Use variables to ‘aggregate’ the status of multiple devices in place of virtual devices
  • Use a variable to dynamically change the threshold of an IF condition
    • eg. Change the threshold from the dashboard and the IF condition in a rule will use that value for a comparison - for example, when you want to fine tune a temperature threshold

Screenshots

Here are a couple screenshots showing where to toggle the static input or variable in the Trigger/IF_Condition and Device Command.

2 Likes