You can leave the event state state
blank with the input select, then send that to a switch. To switch to away mode use the zone.home
sensor in the provided trigger node.
I assume you have a boolean to turn guest mode on/off, if not you’ll need one. Change the input boolean name to your entity’s name in the conditions of the trigger node. If guest mode is on, the trigger node will not fire if you leave the home zone.
[{"id":"0608a6e03d9fb5fe","type":"server-state-changed","z":"0a325c35fc29f44e","name":"","server":"","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_select.test","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":210,"y":1360,"wires":[["a4ba8fda71461b04"]]},{"id":"a4ba8fda71461b04","type":"switch","z":"0a325c35fc29f44e","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"home","vt":"str"},{"t":"eq","v":"away","vt":"str"},{"t":"eq","v":"morning","vt":"str"},{"t":"eq","v":"night","vt":"str"},{"t":"eq","v":"bedtime","vt":"str"},{"t":"eq","v":"guest","vt":"str"}],"checkall":"true","repair":false,"outputs":6,"x":510,"y":1360,"wires":[["75ede5c2dff83b60"],["7be5de02c2bc7a1e"],["d1af37e21074fbd8"],["a9548ed312046e47"],["c2155e68ed5167ac"],["2456a6670b6fb5a4"]]},{"id":"22e44f0fec8c179c","type":"trigger-state","z":"0a325c35fc29f44e","name":"zone.home","server":"","version":4,"inputs":0,"outputs":2,"exposeAsEntityConfig":"","entityId":"zone.home","entityIdType":"exact","debugEnabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"<","comparatorValueDatatype":"num","comparatorValue":"1"},{"targetType":"entity_id","targetValue":"input_boolean.guest_mode","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"off"}],"customOutputs":[],"outputInitially":false,"stateType":"str","enableInput":false,"x":140,"y":1460,"wires":[["cf6658345c3f7f5a"],[]]},{"id":"cf6658345c3f7f5a","type":"api-call-service","z":"0a325c35fc29f44e","name":"set select to away","server":"","version":5,"debugenabled":false,"domain":"","service":"","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":390,"y":1460,"wires":[[]]},{"id":"75ede5c2dff83b60","type":"api-call-service","z":"0a325c35fc29f44e","name":"home","server":"","version":5,"debugenabled":false,"domain":"","service":"","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":710,"y":1200,"wires":[[]]},{"id":"7be5de02c2bc7a1e","type":"api-call-service","z":"0a325c35fc29f44e","name":"away","server":"","version":5,"debugenabled":false,"domain":"","service":"","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":710,"y":1260,"wires":[[]]},{"id":"2456a6670b6fb5a4","type":"api-call-service","z":"0a325c35fc29f44e","name":"guest","server":"","version":5,"debugenabled":false,"domain":"","service":"","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":710,"y":1500,"wires":[[]]},{"id":"c2155e68ed5167ac","type":"api-call-service","z":"0a325c35fc29f44e","name":"bedtime","server":"","version":5,"debugenabled":false,"domain":"","service":"","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":720,"y":1440,"wires":[[]]},{"id":"a9548ed312046e47","type":"api-call-service","z":"0a325c35fc29f44e","name":"night","server":"","version":5,"debugenabled":false,"domain":"","service":"","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":710,"y":1380,"wires":[[]]},{"id":"d1af37e21074fbd8","type":"api-call-service","z":"0a325c35fc29f44e","name":"morning","server":"","version":5,"debugenabled":false,"domain":"","service":"","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":720,"y":1320,"wires":[[]]}]
Edit I realized that the select will dictate if guest mode is active. You can use that in the trigger rather than creating an input boolean. Use is not
for it’s state
and the State Type
should be set to number
as well