Saving previous house mode with MSR
-
I've traditionally set a scene that it's turning on lights based on transitions from a given house mode (ie: from night or away to home) and I'm trying to port it to MSR.
I've tried the groups, with no luck.
I could write 4 rules in order to save it, but I'm wondering if there's a better way to handle this (ie, to push via MQTT the previous and the current value of a generic entity, for example). Something like a "previous value for X". Thanks!
-
There is a changes operator in conditions that will accept 0, 1 or 2 operands. The 0 operand form detects any change (from anything to anything), the 1 operand form detects a change from or to a value (depending on which of the two operands you populate and which you leave blank, e.g anything to Home or Away to anything), and the 2 operand detects a specific change from the value of the first operand to the value of the second (e.g. Away to Home). Is that sufficient for your purpose?
-
There is a changes operator in conditions that will accept 0, 1 or 2 operands. The 0 operand form detects any change (from anything to anything), the 1 operand form detects a change from or to a value (depending on which of the two operands you populate and which you leave blank, e.g anything to Home or Away to anything), and the 2 operand detects a specific change from the value of the first operand to the value of the second (e.g. Away to Home). Is that sufficient for your purpose?
Yep, that's what I'm using. More context.
I want to see the previous house mode, because I'm running different things based on the previous (not the current) house mode. So, I have 4 Rules like this:And I'm effectively setting a global variable to track the previous value. In an ideal world, I could capture and use the previous value and assign it to a variable and delete the other three different rules.
-
This is the way to do it for now.
-
T toggledbits locked this topic on