Reverse the order of constraint and mapping: since power off always maps to off regardless of what the sensor says, this simplifies the conditions slightly, reducing from 4 branches to 3.
@@ -74,20 +74,15 @@ primary_entity:
type: boolean
name: hvac_action
mapping:
- - dps_val: true
- constraint: hvac_mode
+ - constraint: hvac_mode
conditions:
- value: heating
- - dps_val: false
- value: "off"
- conditions:
- value: idle
- dps_val: false
value: "off"
+ - mapping:
+ - dps_val: true
+ value: heating
+ - dps_val: false
+ value: idle
- id: 104
type: integer
name: unknown_104