Rules and Modes

I have been struggling for a couple of days on the idea of the Weather changing the mode of my habitat. I have a mode setup for "Cloudy days" where hallway lights go on when the mode is set. Other dark areas of the house are lit, and the shades in certain rooms open during the daylight hours. I wanted to link this to the weather API or my weather station, but I can not see where I can trigger the change in mode with any of those items. If anyone knows of a way, please let me know.

I'm not sure how you're automating modes now, but I might assume you're using the Mode Manager app. Mode Manager doesn't have options for this kind of customization, but you could supplement it (or whatever you're using now) with a few Rule Machine rules to get what you want. One of the available actions in Rule Machine is to change mode. For example, I have lux tied into my mode changes, which are mostly otherwise handled by Mode Manager, with this rule:

If you're new to Rule Machine, this screenshot doesn't show the exact details of how I set this up, but it does show you what the end result should look like. I started with a trigger of capability "Illuminance" and chose a sensor I have that points outdoors. If your weather device doesn't use this standard capability, you should still be ablet o choose a custom capability. (This is assuming your weather device exists in Hubitat in some form at all, not merely that it has an API that could be used for this; if there is no Hubitat device, how to integrate it would be the first step.)

My actions basically make sure that it's late enough in the day (past 15:00, or 3 PM), that mode is still Day, and that the sensor has stayed below my threshold for long enough (10 minutes--just to catch either lux that quickly oscillates above and below this, or something unexpected like me moving the sensor to check something). I'm also using Private Boolean to more or less limit this to happening at most once per day (so if it changes to Cloudy and I'm not ready for that yet, I can change it back), using the fact that lux will probably rise above my threshold the next day as a proxy for actual time passing, but you can ignore some of these details. I also have a notification since I'm trying to figure out a good threshold and want an easy way to see when this happens; you, of course, don't need that--but might want something when the rule is new.

Maybe something like this will help you!

Just to add on, I am also using a lux global variable to distinguish “dark” vs “light” states and then firing off a bunch of different rules based off that variable.

This first image shows the global variable changes to/from “light” or “dark” states based on a light sensor outside that reports back every 10lux.

This second image shows a handful of actions that fire off when the variable is updated. If “dark” (and depending on time of day) then turn on the outdoor lights and some lamps around the house. If “light” then turn off the outdoor lights.

There are separate motion-sensor based rules that only trigger when the variable is in the “dark” state. Lighting up hallways only when it’s dark out.

Advantage to lux over weather or “sunrise/sunset” defaults is you get a much more accurate setting that isn’t impacted by daylight savings time or time of day. Whether it’s 5pm, 7pm, or just dark and raining... and when lux falls below a predetermined value then the outdoor lights should be on, regardless of time of day.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.