-
Notifications
You must be signed in to change notification settings - Fork 6
Binary State with External Validation
Binary state is commonly represented as one of two values - on/off, true/false, yes/no, 0/1.
When using binary state for automation, good practice suggests performing external validation for critical inputs and outputs.
For example, input from a heater may be used to set the isHeaterOn logical state, with external validation added based on subsequent temperature readings.
States following this convention are named as binary, but define the value as:
- 1.00 - IN this state
- 0.66 - Thought to be IN this state, but un-verified
- 0.50 - Unsure, more IN than not
- 0.49 - Unsure, more NOT than in
- 0.33 - Thought to be NOT in this state, but un-verified
- 0.00 - NOT in this state
This convention helps with consistency, and assists derived states in computing their confidence.
A consistent pattern starts with setting a state in either 0.66 or 0.33 until it's externally validated, either increasing or decreasing the value based on the number of external validations, and the quality of those validations.
If confidence decays over time, the value can increase to 0.65 or decrease to 0.34 but generally shouldn't extend outside of that range without external validation.
Ranges
- 0 / 1 - Highest confidence.
- 0.66 / 0.33 - Initial unverified state
- Verified (0.67 - .99, 0.32 - 0.01) - Externally verified, value specifies confidence in external validation
- Unsure (0.34 - 0.65) - Unsure about the value - in this range due to time decay or unsure validation
Accuracy is undefined, and rounded to 2 digits for documentation purposes only.