Working on my first app and trying to use my air sensors AwAir Element to calculate an AQI value. Does anyone know of an app out there that will calculate based on a value from a device. I have looked at the examples on Hubitats documentation site and can get to the point where i can select my AwAir device using capability.polling
What do you do to get down into the device and select an attribute value. Essentially, i want to take the pm25 throw that against a series of conditions, select a condition and then calculate the AQI within that conditional range.
My use case for this is to track and maintain the AQI within my house during fire season.
Workflow for the App is:
- User selects Device (AwAir or whatever Air Quality Device they have installed)
- User sees attribute options or sensors and selects the PM25 sensor
- Go through a switch statement to calculate the AQI
- Returns AQI Number, AQI Color and AQI Description for USA calculations
Update
I can get to the device attributes and ask the user to choose the attribute they want. I now am struggling to get the value from the Input "Selected Attribute" to pass into the .currentValue() property. If i hard code in "pm25" it pulls the value from the device. but i want the app to pass in the pm25 sensor the user chose.