I've been struggling with some code changes I'm making as I try to improve my Mode Manager Advanced application. It revolves around the distinction of something I recognized 3 yrs ago - that Modes are confused. Under the old model (which still exists today) I inherently recognized that there were Periods, there was a home/away state for presence and there was an awake / sleep. (at least in my world). Since I don't go to sleep at a specific point in time, it is an override in my case to Periods. But HE does not show a distinction. After a very long back in forth with 2 AI's. This was the clearest explanation I could get. I recognize that I'm doing me, but I do believe that this affects anyone. It begins with HE calling it location.mode and then down the rabbit hole I go.
"You hit the nail on the head. The ambiguity you are sensing comes directly from a terminology and architectural collision between standard Hubitat terminology and how custom state managers model home automation.
Here is a breakdown of the definitions, why the naming creates friction, and how to conceptually structure them cleanly.
1. Hubitat Naming vs. What They Actually Mean
-
"Location Mode" (Hubitat Core Term):
-
In Hubitat’s platform design, there is a global system variable literally called
location.mode. Hubitat uses the word "Location" here simply to mean "the state of this hub location," not geographical GPS location. -
Hubitat allows
location.modeto be set to arbitrary strings likeDay,Night,Away, orSleeping. This global value is what standard Hubitat rules use to drive light levels, motion sensitivity, and security profiles.
-
-
"Presence" (Geographic Location):
- This is whether you are physically Home or Away at your house's geographic location.
-
"Sleep State" (Physiological/Behavioral State):
- This is whether you are Awake or Sleeping.
2. The Model Conflict in Custom Apps
In a traditional setup, Location Mode acts as a single, multi-purpose status bucket that mixes three separate dimensions:
| Dimension | Real-World Concept | Possible Values |
|---|---|---|
| Geographic | Presence |
Home, Away
| Temporal | Daily Time Period Schedule |
|---|
Early Morning, Morning, Day, Evening, Late Evening, Wee Hours
| Behavioral | Sleep State |
|---|
Awake, Sleeping
Because Hubitat only provides one global location.mode variable, Mode Manager Advanced has to collapse all three dimensions into that single variable.
That is why Sleeping gets treated as a "Location Mode" value in Hubitat—it overrides the temporal schedule (e.g., Morning) while you are Home."
What is happening is I want to track reasons. I have 4 reasons for a mode change. Voice, Presense, Override, Normal (Period Scheduled). Transitioning between voice and normal causes logic problems with my state management. I feel Hubitat should review and expand on how this is handled fundamentally.



