Sometimes in a smart home you don’t just want to be alerted to changes—you also want to know the current value immediately. For instance, you might want to check the CO₂ level in your workspace as soon as you enter, ensuring the air quality is optimal. In this step-by-step guide, we’ll show you how to include a device value in your workflow.
Start Event
First, add the start event for your workflow. In our example, motion detection in the office triggers the workflow.
Steps
Add the Step “Get Accessory State”
Begin by adding the “Get Accessory State” step to retrieve the CO₂ level. By default, the value is stored in the incrementing variable P1, which you can rename if needed. We rename it to “CARBONDIOXIDE.”
Add the Step "Notification"
Next, add the “Notification” step to send the alert. Enter “Carbon Dioxide Report” as the title. In the message field, type: “The current Carbon Dioxide Level is $CARBONDIOXIDE.”
The dollar sign indicates that the variable “CARBONDIOXIDE” should be inserted here—the placeholder will be replaced with the retrieved value in the notification.
Final Overview
As soon as you enter the office, you’ll receive a notification displaying the current CO₂ level. Please note that automatic workflow execution requires a device with Hub Mode enabled.
