Capturing current humidity level as a variable

Posted on
Fri Apr 30, 2021 9:45 pm
Eagleye offline
Posts: 82
Joined: Jan 14, 2019

Capturing current humidity level as a variable

I have a multisensor 6 installed in my bathroom, which measures humidity. I would like to capture the set point humidity level before I turn the showers on and the humidity level starts to rise, so as I can create a trigger or schedule for the exhaust fan to turn off when it reaches this set point +2%.
I hope this makes sense.

In other words, is there a way I can capture the humidity level within the room at any given time as a variable? If so, can you please provide the script for this.

Posted on
Sat May 01, 2021 1:30 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Capturing current humidity level as a variable

Yes, just use the UI Action Variable Actions->Insert Device State into Variable.

Image

Posted on
Sat May 01, 2021 1:31 pm
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Capturing current humidity level as a variable

2 ways....

As an action, so hypothetically.... set a trigger to watch the bathroom light. Light turns on, then it sets a device state to a variable.

Screen Shot 2021-05-01 at 2.24.42 PM.png
Screen Shot 2021-05-01 at 2.24.42 PM.png (261.84 KiB) Viewed 1324 times



As a script....
Code: Select all
devValue = multi6_name.states['humidity'] # Substitue with actual device name and  whatever the state name is for the humidity value.
indigo.variable.updateValue(123456, value=str(devValue))  # Substitute 123456 with the variableID number

Bill
My Plugin: My People

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest