Tweak master bedroom wakeup logic
This commit is contained in:
136
flows.json
136
flows.json
@ -802,7 +802,6 @@
|
||||
"1f7ac875e593d434",
|
||||
"9179e99207e9f8f3",
|
||||
"404c42d6fea46839",
|
||||
"ab9ff37610258694",
|
||||
"7a7f626dce181b23",
|
||||
"f541ad53e32f703b",
|
||||
"66e85878d60c7d65",
|
||||
@ -824,7 +823,6 @@
|
||||
"67509a5554fc091f",
|
||||
"1eb13d819ba7e226",
|
||||
"a10629857d60f774",
|
||||
"a370aec30428ffb1",
|
||||
"e2ad91fc748ca519",
|
||||
"a3ef2faca9922113",
|
||||
"a8ef744455bb4c0a",
|
||||
@ -832,7 +830,8 @@
|
||||
"4a1db30e164dadc8",
|
||||
"9c01880c6319d29b",
|
||||
"96f6dcaa16f8ee6f",
|
||||
"1967e5238d3aa5a1"
|
||||
"1967e5238d3aa5a1",
|
||||
"f8cc9d6657bff329"
|
||||
],
|
||||
"x": 14,
|
||||
"y": 19,
|
||||
@ -17354,43 +17353,6 @@
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "ab9ff37610258694",
|
||||
"type": "switch",
|
||||
"z": "72f99805df043603",
|
||||
"g": "e065b1ed4938b477",
|
||||
"name": "Is A/C Installed?",
|
||||
"property": "mb_aircon_installed",
|
||||
"propertyType": "global",
|
||||
"rules": [
|
||||
{
|
||||
"t": "eq",
|
||||
"v": "on",
|
||||
"vt": "str"
|
||||
},
|
||||
{
|
||||
"t": "else"
|
||||
}
|
||||
],
|
||||
"checkall": "true",
|
||||
"repair": false,
|
||||
"outputs": 2,
|
||||
"x": 1080,
|
||||
"y": 460,
|
||||
"wires": [
|
||||
[
|
||||
"e473da127624f191",
|
||||
"a370aec30428ffb1"
|
||||
],
|
||||
[
|
||||
"e473da127624f191"
|
||||
]
|
||||
],
|
||||
"outputLabels": [
|
||||
"Yes",
|
||||
"No"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "7a7f626dce181b23",
|
||||
"type": "link in",
|
||||
@ -17552,7 +17514,7 @@
|
||||
"y": 420,
|
||||
"wires": [
|
||||
[
|
||||
"ab9ff37610258694"
|
||||
"f8cc9d6657bff329"
|
||||
]
|
||||
]
|
||||
},
|
||||
@ -17667,8 +17629,8 @@
|
||||
"mustacheAltTags": false,
|
||||
"outputProperties": [],
|
||||
"queue": "none",
|
||||
"x": 1430,
|
||||
"y": 600,
|
||||
"x": 1010,
|
||||
"y": 620,
|
||||
"wires": [
|
||||
[
|
||||
"096369136e9e607f"
|
||||
@ -17697,8 +17659,8 @@
|
||||
"mustacheAltTags": false,
|
||||
"outputProperties": [],
|
||||
"queue": "none",
|
||||
"x": 1600,
|
||||
"y": 600,
|
||||
"x": 1180,
|
||||
"y": 620,
|
||||
"wires": [
|
||||
[]
|
||||
]
|
||||
@ -17708,7 +17670,7 @@
|
||||
"type": "ha-button",
|
||||
"z": "72f99805df043603",
|
||||
"g": "e065b1ed4938b477",
|
||||
"name": "Fan Only",
|
||||
"name": "A/C Fan Only",
|
||||
"version": 0,
|
||||
"debugenabled": false,
|
||||
"outputs": 1,
|
||||
@ -17719,22 +17681,10 @@
|
||||
"propertyType": "msg",
|
||||
"value": "",
|
||||
"valueType": "entityState"
|
||||
},
|
||||
{
|
||||
"property": "topic",
|
||||
"propertyType": "msg",
|
||||
"value": "",
|
||||
"valueType": "triggerId"
|
||||
},
|
||||
{
|
||||
"property": "data",
|
||||
"propertyType": "msg",
|
||||
"value": "",
|
||||
"valueType": "entity"
|
||||
}
|
||||
],
|
||||
"x": 1260,
|
||||
"y": 600,
|
||||
"x": 830,
|
||||
"y": 620,
|
||||
"wires": [
|
||||
[
|
||||
"1dfb0bcc98f1457b"
|
||||
@ -18319,45 +18269,13 @@
|
||||
],
|
||||
"icon": "node-red-contrib-cpu/cpu.png"
|
||||
},
|
||||
{
|
||||
"id": "a370aec30428ffb1",
|
||||
"type": "switch",
|
||||
"z": "72f99805df043603",
|
||||
"g": "e065b1ed4938b477",
|
||||
"name": "Threshold",
|
||||
"property": "hightemp",
|
||||
"propertyType": "msg",
|
||||
"rules": [
|
||||
{
|
||||
"t": "gte",
|
||||
"v": "daythreshold",
|
||||
"vt": "str"
|
||||
},
|
||||
{
|
||||
"t": "else"
|
||||
}
|
||||
],
|
||||
"checkall": "true",
|
||||
"repair": false,
|
||||
"outputs": 2,
|
||||
"x": 1280,
|
||||
"y": 460,
|
||||
"wires": [
|
||||
[
|
||||
"24c3166123d5dad0"
|
||||
],
|
||||
[
|
||||
"1967e5238d3aa5a1"
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "e2ad91fc748ca519",
|
||||
"type": "function",
|
||||
"z": "72f99805df043603",
|
||||
"g": "e065b1ed4938b477",
|
||||
"name": "Cooling Mode",
|
||||
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar ac = global.get('mb_aircon_installed')\nvar showerMode = msg.showermode\nvar schedMode = states['input_select.scheduled_climate_mode_master_bedroom_aircon'].state\nvar hotDay = states['input_boolean.hot_day'].state\n\nmsg.schedmode = schedMode\n\nif (ac === 'on' && showerMode === 'off') {\n if (schedMode === 'AC') {\n if (hotDay === 'on') {\n msg.preset = 'none'\n } else {\n msg.preset = 'eco'\n }\n node.status({fill:\"green\",shape:\"dot\",text:\"AC\"});\n return[msg,null,null]\n } else if (schedMode === 'Fan') {\n node.status({fill:\"green\",shape:\"dot\",text:\"Fan\"});\n return[null,msg,null]\n } else if (schedMode === 'N/A') {\n node.status({fill:\"blue\",shape:\"dot\",text:\"N/A\"});\n return[null,null,msg]\n }\n} else {\n if (ac === 'off') {\n node.status({fill:\"red\",shape:\"ring\",text:\"A/C Not Installed\"});\n } else if (showerMode === 'on') {\n node.status({fill:\"red\",shape:\"ring\",text:\"Shower Mode On\"});\n }\n return[null,null,null]\n}",
|
||||
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar ac = global.get('mb_aircon_installed')\nvar showerMode = msg.showermode\nvar schedMode = states['input_select.scheduled_climate_mode_master_bedroom_aircon'].state\nvar hotDay = states['input_boolean.hot_day'].state\n\nmsg.schedmode = schedMode\n\nif (ac === 'on' && showerMode === 'off') {\n if (schedMode === 'AC') {\n if (hotDay === 'on') {\n msg.preset = 'none'\n } else {\n msg.preset = 'eco'\n }\n node.status({fill:\"green\",shape:\"dot\",text:\"AC\"});\n return[msg,null,null]\n } else if (schedMode === 'Fan') {\n node.status({fill:\"green\",shape:\"dot\",text:\"Fan\"});\n return[null,msg,null]\n } else if (schedMode === 'N/A') {\n node.status({fill:\"blue\",shape:\"dot\",text:\"N/A\"});\n return[null,null,msg]\n }\n} else {\n if (ac === 'off') {\n node.status({fill:\"red\",shape:\"ring\",text:\"A/C Not Installed\"});\n } else if (showerMode === 'on') {\n node.status({fill:\"red\",shape:\"ring\",text:\"Shower Mode On\"});\n }\n return null\n}",
|
||||
"outputs": 3,
|
||||
"noerr": 0,
|
||||
"initialize": "",
|
||||
@ -18844,6 +18762,38 @@
|
||||
],
|
||||
"l": false
|
||||
},
|
||||
{
|
||||
"id": "f8cc9d6657bff329",
|
||||
"type": "function",
|
||||
"z": "72f99805df043603",
|
||||
"g": "e065b1ed4938b477",
|
||||
"name": "Hot Day?",
|
||||
"func": "var states = global.get('homeassistant.homeAssistant.states')\nvar ac = global.get('mb_aircon_installed')\nvar highTemp = states['sensor.todays_high_temp'].state\nvar dayThreshold = states['input_number.master_bedroom_daytime_threshold'].state\nvar dayTemp = states['input_number.master_bedroom_daytime_temp'].state\nvar nightTemp = states['input_number.master_bedroom_night_temp'].state\n\nmsg.daytemp = dayTemp\nmsg.nighttemp = nightTemp\n\nif (ac === 'on') {\n if (highTemp > dayThreshold) {\n node.status({fill:\"green\",shape:\"dot\",text:\"Hot Day\"});\n return[msg,null,msg]\n } else {\n node.status({fill:\"green\",shape:\"dot\",text:\"Normal\"});\n return[null,msg,msg]\n }\n} else {\n node.status({fill:\"red\",shape:\"ring\",text:\"No A/C\"});\n return[null,null,msg]\n}",
|
||||
"outputs": 3,
|
||||
"noerr": 0,
|
||||
"initialize": "",
|
||||
"finalize": "",
|
||||
"libs": [],
|
||||
"x": 1100,
|
||||
"y": 420,
|
||||
"wires": [
|
||||
[
|
||||
"24c3166123d5dad0"
|
||||
],
|
||||
[
|
||||
"1967e5238d3aa5a1"
|
||||
],
|
||||
[
|
||||
"e473da127624f191"
|
||||
]
|
||||
],
|
||||
"outputLabels": [
|
||||
"Hot Day",
|
||||
"Normal",
|
||||
"No A/C"
|
||||
],
|
||||
"icon": "font-awesome/fa-thermometer"
|
||||
},
|
||||
{
|
||||
"id": "105271e0816c6a52",
|
||||
"type": "ha-button",
|
||||
|
Reference in New Issue
Block a user