Dreame L20 Ultra 在NodeRed中設定分區掃地+掃地模式+TTS+Line設定方式
NR完整Flow
[{"id":"6bccd1fa4b152529","type":"function","z":"9acb0b97de688143","name":"掃地模式判斷設定","func":"var roomMapping = new Map([\n [\"input_button.all_room_sweeping\", { roomid: 0, mode: \"sweeping\" }],\n [\"input_button.all_room_mopping\", { roomid: 0, mode: \"mopping\" }],\n [\"input_button.all_room_sweeping_and_mopping\", { roomid: 0, mode: \"sweeping_and_mopping\" }],\n [\"input_button.all_room_mopping_after_sweeping\", { roomid: 0, mode: \"mopping_after_sweeping\" }],\n [\"input_button.room_1_sweeping\", { roomid: 1, mode: \"sweeping\" }],\n [\"input_button.room_1_mopping\", { roomid: 1, mode: \"mopping\" }],\n [\"input_button.room_1_sweeping_and_mopping\", { roomid: 1, mode: \"sweeping_and_mopping\" }],\n [\"input_button.room_1_mopping_after_sweeping\", { roomid: 1, mode: \"mopping_after_sweeping\" }],\n [\"input_button.room_2_sweeping\", { roomid: 2, mode: \"sweeping\" }],\n [\"input_button.room_2_mopping\", { roomid: 2, mode: \"mopping\" }],\n [\"input_button.room_2_sweeping_and_mopping\", { roomid: 2, mode: \"sweeping_and_mopping\" }],\n [\"input_button.room_2_mopping_after_sweeping\", { roomid: 2, mode: \"mopping_after_sweeping\" }],\n [\"input_button.room_3_sweeping\", { roomid: 3, mode: \"sweeping\" }],\n [\"input_button.room_3_mopping\", { roomid: 3, mode: \"mopping\" }],\n [\"input_button.room_3_sweeping_and_mopping\", { roomid: 3, mode: \"sweeping_and_mopping\" }],\n [\"input_button.room_3_mopping_after_sweeping\", { roomid: 3, mode: \"mopping_after_sweeping\" }],\n [\"input_button.room_4_sweeping\", { roomid: 4, mode: \"sweeping\" }],\n [\"input_button.room_4_mopping\", { roomid: 4, mode: \"mopping\" }],\n [\"input_button.room_4_sweeping_and_mopping\", { roomid: 4, mode: \"sweeping_and_mopping\" }],\n [\"input_button.room_4_mopping_after_sweeping\", { roomid: 4, mode: \"mopping_after_sweeping\" }]\n]);\n\nvar mappingResult = roomMapping.get(msg.topic) || { roomid: 0, mode: \"sweeping_and_mopping\" };\n\nvar entityIds = [];\nvar cleaningMode = mappingResult.mode;\nvar zhTWZone = \"\";\nvar zhTWMode = \"\";\n\nif (mappingResult.roomid === 0) {\n entityIds = [\"select.dreamebot_l20_ultra_room_1_cleaning_mode\", \"select.dreamebot_l20_ultra_room_2_cleaning_mode\", \"select.dreamebot_l20_ultra_room_3_cleaning_mode\", \"select.dreamebot_l20_ultra_room_4_cleaning_mode\"];\n msg.payload_segments = {\"segments\": [1, 2, 3, 4]};\n zhTWZone = \"全屋\";\n} else {\n entityIds = [`select.dreamebot_l20_ultra_room_${mappingResult.roomid}_cleaning_mode`];\n msg.payload_segments = {\"segments\": mappingResult.roomid};\n // Map roomid to corresponding zone\n var roomidToZoneMap = {\n 1: \"房間1\",\n 2: \"房間2\",\n 3: \"房間3\",\n 4: \"房間4\"\n };\n zhTWZone = roomidToZoneMap[mappingResult.roomid] || \"未知區域\";\n}\n\n// Map cleaningMode to corresponding mode in zh-TW\nvar modeToZhTWMap = {\n \"sweeping\": \"掃地模式\",\n \"mopping\": \"拖地模式\",\n \"sweeping_and_mopping\": \"掃拖模式\",\n \"mopping_after_sweeping\": \"先掃後拖\"\n};\n\nzhTWMode = modeToZhTWMap[cleaningMode] || \"未知模式\";\n\nmsg.payload_target = {\n \"entity_id\": entityIds\n};\n\nmsg.payload_setroommode = {\n \"entity_id\": msg.payload_target.entity_id,\n \"option\": cleaningMode\n};\n\nmsg.payload_roomid = mappingResult.roomid;\nmsg.payload_mode = mappingResult.mode;\nmsg.payload_tts = {\n \"message\": `掃地機開始掃地,清掃區域 ${zhTWZone},模式為 ${zhTWMode}`,\n \"cache\": true,\n \"options\": {\n \"volume\": \"+100%\",\n \"voice\": \"zh-TW-HsiaoChenNeural\", // or use randomVoice if needed\n \"pitch\": \"+0Hz\",\n \"rate\": \"+0%\"\n }\n};\nmsg.payload_line = { \"message\": \"掃地機開始掃地\\n清掃區域為:\" + zhTWZone + \"\\n模式為:\" + zhTWMode};\n\nreturn msg;\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":190,"y":400,"wires":[["3148bd00d8fa70d9","a17184ae462e080e","5f6f154608327076"]]},{"id":"d9a35a14e6010542","type":"server-state-changed","z":"9acb0b97de688143","name":"全屋掃地","server":"91a78be.0d63e78","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.all_room_sweeping","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":140,"y":100,"wires":[["6bccd1fa4b152529"]]},{"id":"a6a83c4889d9dadd","type":"server-state-changed","z":"9acb0b97de688143","name":"全屋拖地","server":"91a78be.0d63e78","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.all_room_mopping","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":140,"y":160,"wires":[["6bccd1fa4b152529"]]},{"id":"8fc8a38e7eabfe57","type":"server-state-changed","z":"9acb0b97de688143","name":"全屋掃拖","server":"91a78be.0d63e78","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.all_room_sweeping_and_mopping","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":140,"y":220,"wires":[["6bccd1fa4b152529"]]},{"id":"dbe06219a41007f0","type":"server-state-changed","z":"9acb0b97de688143","name":"全屋先掃後拖","server":"91a78be.0d63e78","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.all_room_mopping_after_sweeping","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":150,"y":280,"wires":[["6bccd1fa4b152529"]]},{"id":"3148bd00d8fa70d9","type":"api-call-service","z":"9acb0b97de688143","name":"執行掃地房間與模式選擇","server":"91a78be.0d63e78","version":5,"debugenabled":false,"domain":"select","service":"select_option","areaId":[],"deviceId":[],"entityId":[],"data":"msg.payload_setroommode","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":450,"y":380,"wires":[["3ea7c8c625e18c98"]]},{"id":"d419c4abe44a09db","type":"server-state-changed","z":"9acb0b97de688143","name":"房間1掃地","server":"91a78be.0d63e78","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.room_1_sweeping","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":360,"y":100,"wires":[["6bccd1fa4b152529"]]},{"id":"2e929f65c47e6d2b","type":"server-state-changed","z":"9acb0b97de688143","name":"房間1拖地","server":"91a78be.0d63e78","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.room_1_mopping","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":360,"y":160,"wires":[["6bccd1fa4b152529"]]},{"id":"c23d99f8567b6317","type":"server-state-changed","z":"9acb0b97de688143","name":"房間1掃拖","server":"91a78be.0d63e78","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.room_1_sweeping_and_mopping","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":360,"y":220,"wires":[["6bccd1fa4b152529"]]},{"id":"57c68514d2b832a1","type":"server-state-changed","z":"9acb0b97de688143","name":"房間1先掃後拖","server":"91a78be.0d63e78","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.room_1_mopping_after_sweeping","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":380,"y":280,"wires":[["6bccd1fa4b152529"]]},{"id":"4a5fed69b4ee97d1","type":"server-state-changed","z":"9acb0b97de688143","name":"房間2掃地","server":"91a78be.0d63e78","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.room_2_sweeping","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":600,"y":100,"wires":[["6bccd1fa4b152529"]]},{"id":"bc46818226f8d827","type":"server-state-changed","z":"9acb0b97de688143","name":"房間2拖地","server":"91a78be.0d63e78","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.room_2_mopping","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":600,"y":160,"wires":[["6bccd1fa4b152529"]]},{"id":"ca5ad7a12faf51bc","type":"server-state-changed","z":"9acb0b97de688143","name":"房間2掃拖","server":"91a78be.0d63e78","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.room_2_sweeping_and_mopping","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":600,"y":220,"wires":[["6bccd1fa4b152529"]]},{"id":"d569ddcb2f6fcc10","type":"server-state-changed","z":"9acb0b97de688143","name":"房間2先掃後拖","server":"91a78be.0d63e78","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.room_2_mopping_after_sweeping","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":620,"y":280,"wires":[["6bccd1fa4b152529"]]},{"id":"51d4b23a3679d887","type":"server-state-changed","z":"9acb0b97de688143","name":"房間3掃地","server":"91a78be.0d63e78","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.room_3_sweeping","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":840,"y":100,"wires":[["6bccd1fa4b152529"]]},{"id":"f2961ae94c8b2f52","type":"server-state-changed","z":"9acb0b97de688143","name":"房間3拖地","server":"91a78be.0d63e78","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.room_3_mopping","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":840,"y":160,"wires":[["6bccd1fa4b152529"]]},{"id":"de1b044ee1336b96","type":"server-state-changed","z":"9acb0b97de688143","name":"房間3掃拖","server":"91a78be.0d63e78","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.room_3_sweeping_and_mopping","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":840,"y":220,"wires":[["6bccd1fa4b152529"]]},{"id":"a8afaf8625324ea3","type":"server-state-changed","z":"9acb0b97de688143","name":"房間3先掃後拖","server":"91a78be.0d63e78","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.room_3_mopping_after_sweeping","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":860,"y":280,"wires":[["6bccd1fa4b152529"]]},{"id":"16ed3f11c7a85169","type":"server-state-changed","z":"9acb0b97de688143","name":"房間4掃地","server":"91a78be.0d63e78","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.room_4_sweeping","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":1080,"y":100,"wires":[["6bccd1fa4b152529"]]},{"id":"a465cd484aba3e22","type":"server-state-changed","z":"9acb0b97de688143","name":"房間4拖地","server":"91a78be.0d63e78","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.room_4_mopping","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":1080,"y":160,"wires":[["6bccd1fa4b152529"]]},{"id":"7fa8b79d2ae31f2a","type":"server-state-changed","z":"9acb0b97de688143","name":"房間4掃拖","server":"91a78be.0d63e78","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.room_4_sweeping_and_mopping","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":1080,"y":220,"wires":[["6bccd1fa4b152529"]]},{"id":"d304977adb5c6fb2","type":"server-state-changed","z":"9acb0b97de688143","name":"房間4先掃後拖","server":"91a78be.0d63e78","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.room_4_mopping_after_sweeping","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":1100,"y":280,"wires":[["6bccd1fa4b152529"]]},{"id":"3ea7c8c625e18c98","type":"api-call-service","z":"9acb0b97de688143","name":"執行掃地","server":"91a78be.0d63e78","version":5,"debugenabled":false,"domain":"dreame_vacuum","service":"vacuum_clean_segment","areaId":[],"deviceId":[],"entityId":["vacuum.dreamebot_l20_ultra"],"data":"msg.payload_segments","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":660,"y":380,"wires":[[]]},{"id":"a17184ae462e080e","type":"api-call-service","z":"9acb0b97de688143","name":"HomePod音量70%","server":"91a78be.0d63e78","version":5,"debugenabled":false,"domain":"media_player","service":"volume_set","areaId":[],"deviceId":[],"entityId":["media_player.homepod_mini","media_player.hong_jun_fang_jian_2"],"data":"{\"volume_level\": \"0.7\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":430,"y":440,"wires":[["ac9a50f96ef48716"]]},{"id":"ac9a50f96ef48716","type":"api-call-service","z":"9acb0b97de688143","name":"紅軍房間HomePod 2 TTS","server":"91a78be.0d63e78","version":5,"debugenabled":false,"domain":"tts","service":"edge_tts_say","areaId":[],"deviceId":[],"entityId":["media_player.hong_jun_fang_jian_2"],"data":"msg.payload_tts","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":650,"y":440,"wires":[[]]},{"id":"5f6f154608327076","type":"api-call-service","z":"9acb0b97de688143","name":"發送Line通知","server":"91a78be.0d63e78","version":5,"debugenabled":false,"domain":"notify","service":"line_notification","areaId":[],"deviceId":[],"entityId":[],"data":"msg.payload_line","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":430,"y":520,"wires":[[]]},{"id":"91a78be.0d63e78","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]