- 积分
- 572
- 金钱
- 528
- 威望
- 0
- 贡献
- 0
- HASS币
- 20
高级会员
- 积分
- 572
- 金钱
- 528
- HASS币
- 20
|
本帖最后由 darkleliel 于 2021-12-29 20:14 编辑
冬天北方有集中供暖,由于现在住的算近几年新房子,还是地暖,只要日均温度不常年保持-5℃左右或更低,大部分房间会过热(对应的回路关掉都没用)
于是研究了一下怎样自动控制房间暖气
1.0版:涂鸦Zigbee Radiator Actuator(智能温控暖气阀)
1.5版:分水阀电热执行器(常开型)+220V交流电调光模块(zigbee,QS-Zigbee-D02-TRIAC-2C-LN)
1.5版还是有比较多bug的,比如大部分分水器阀门虽然阀芯有3-4mm左右行程,但本质上只能开闭控制……之前我理解偏差,一直想根据房间温度控制阀芯行程,经过长期观察,用处其实不大,还不如根据温度直接控制分水阀开关比较好
本次2.0版计划处理两个问题:
1、根据房间温度控制对应回路分水阀开闭;
2、因为房间温度依据室外温度、开关门窗,有时气温会有比较大幅的变化,同时地暖作用速度相对也太慢(蓄热层做的比较标准时,大概需要12h以上才有变化)需要在房间气温偏差较大时使用空调调整。
问题一:
在1.5版基础上升级,有4个回路需要控制,把原有2个调光模块换成1个开关模块(其实不换也行),选用涂鸦4路零火通断器(TS0004_switch_module)+常开型电热执行器(适合集中供暖的,自己烧锅炉的可以选常闭型)安装常开型电热执行器时,在断电且放凉的情况下,只要拧到上部不晃动就行
问题二:
因为冬天我已经设置成定时/手动控制单个房间恒定50%湿度,处于湿度控制状态时,用空调伴侣发射预存的红外长码控制空调(海尔官方不支持,我还没搞明白抓包,空调伴侣预存的控制不准而且也没法控制导风板方向,还是预存长码靠谱)。热点还好,冷了比较难受,所以只使用空调制热
以下是我在用的Node-RED流程,供参考:
地暖回路开关(可以手动控制):
[
{
"id": "ad518548.69ce08",
"type": "mqtt in",
"z": "8c257188.cebe",
"name": "",
"topic": "zigbee2mqtt/KitchenRadiatorSwitch",
"qos": "2",
"datatype": "json",
"broker": "2f2d4274.d04c7e",
"nl": false,
"rap": false,
"inputs": 0,
"x": 140,
"y": 160,
"wires": [
[
"a334eb1e3485fd01"
]
]
},
{
"id": "5fcd49f0fefd7a41",
"type": "ha-entity",
"z": "8c257188.cebe",
"name": "Study Radiator Switch",
"server": "1f21f301.8eaead",
"version": 2,
"debugenabled": false,
"outputs": 2,
"entityType": "switch",
"config": [
{
"property": "name",
"value": "Study Radiator"
},
{
"property": "device_class",
"value": ""
},
{
"property": "icon",
"value": "mdi:fire"
},
{
"property": "unit_of_measurement",
"value": ""
},
{
"property": "state_class",
"value": ""
},
{
"property": "last_reset",
"value": ""
}
],
"state": "payload",
"stateType": "msg",
"attributes": [],
"resend": true,
"outputLocation": "payload",
"outputLocationType": "none",
"inputOverride": "allow",
"outputOnStateChange": true,
"outputPayload": "$entity().state ? "on": "off"",
"outputPayloadType": "jsonata",
"x": 780,
"y": 60,
"wires": [
[
"c5e07178b8325264"
],
[
"c5e07178b8325264"
]
]
},
{
"id": "c5e07178b8325264",
"type": "function",
"z": "8c257188.cebe",
"name": "",
"func": "if (msg.outputType === "state change")\n{\n if (msg.payload === "off")\n {\n msg.payload = {"state_l1": "ON"}\n }\n else\n {\n msg.payload = {"state_l1": "OFF"}\n }\n}\nreturn msg\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1060,
"y": 60,
"wires": [
[
"bcc2785163d0398d"
]
]
},
{
"id": "9fc6e765d04d1faf",
"type": "ha-entity",
"z": "8c257188.cebe",
"name": "Second Bedoom Radiator Switch",
"server": "1f21f301.8eaead",
"version": 2,
"debugenabled": false,
"outputs": 2,
"entityType": "switch",
"config": [
{
"property": "name",
"value": "Second Bedoom Radiator"
},
{
"property": "device_class",
"value": ""
},
{
"property": "icon",
"value": "mdi:fire"
},
{
"property": "unit_of_measurement",
"value": ""
},
{
"property": "state_class",
"value": ""
},
{
"property": "last_reset",
"value": ""
}
],
"state": "payload",
"stateType": "msg",
"attributes": [],
"resend": true,
"outputLocation": "payload",
"outputLocationType": "none",
"inputOverride": "allow",
"outputOnStateChange": true,
"outputPayload": "$entity().state ? "on": "off"",
"outputPayloadType": "jsonata",
"x": 820,
"y": 180,
"wires": [
[
"cf25f6b6e6131389"
],
[
"cf25f6b6e6131389"
]
]
},
{
"id": "296ff2f762022062",
"type": "function",
"z": "8c257188.cebe",
"name": "",
"func": "var msg1 = {}\nvar msg2 = {}\nvar msg3 = {}\nvar state_l1 = msg.payload.state_l1\nvar state_l2 = msg.payload.state_l2\nvar state_l3 = msg.payload.state_l3\nvar state_l4 = msg.payload.state_l4\nif (state_l1 === "ON")\n{\n msg.enable = false\n}\nelse\n{\n msg.enable = true\n}\nif (state_l2 === "ON")\n{\n msg1.enable = false\n}\nelse\n{\n msg1.enable = true\n}\nif (state_l3 === "ON")\n{\n msg2.enable = false\n}\nelse\n{\n msg2.enable = true\n}\nif (state_l4 === "ON")\n{\n msg3.enable = false\n}\nelse\n{\n msg3.enable = true\n}\nreturn [msg, msg1, msg2, msg3]\n",
"outputs": 4,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 540,
"y": 160,
"wires": [
[
"5fcd49f0fefd7a41"
],
[
"df64de1a57a897b0"
],
[
"9fc6e765d04d1faf"
],
[
"98288bbeb8a0ddcc"
]
]
},
{
"id": "bcc2785163d0398d",
"type": "mqtt out",
"z": "8c257188.cebe",
"name": "",
"topic": "zigbee2mqtt/KitchenRadiatorSwitch/set",
"qos": "2",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "2f2d4274.d04c7e",
"x": 1350,
"y": 140,
"wires": []
},
{
"id": "a334eb1e3485fd01",
"type": "trigger",
"z": "8c257188.cebe",
"name": "",
"op1": "",
"op2": "",
"op1type": "nul",
"op2type": "payl",
"duration": "1",
"extend": true,
"overrideDelay": false,
"units": "s",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 380,
"y": 160,
"wires": [
[
"296ff2f762022062"
]
]
},
{
"id": "df64de1a57a897b0",
"type": "ha-entity",
"z": "8c257188.cebe",
"name": "Living Room Radiator Switch",
"server": "1f21f301.8eaead",
"version": 2,
"debugenabled": false,
"outputs": 2,
"entityType": "switch",
"config": [
{
"property": "name",
"value": "Living Room Radiator"
},
{
"property": "device_class",
"value": ""
},
{
"property": "icon",
"value": "mdi:fire"
},
{
"property": "unit_of_measurement",
"value": ""
},
{
"property": "state_class",
"value": ""
},
{
"property": "last_reset",
"value": ""
}
],
"state": "payload",
"stateType": "msg",
"attributes": [],
"resend": true,
"outputLocation": "payload",
"outputLocationType": "none",
"inputOverride": "allow",
"outputOnStateChange": true,
"outputPayload": "$entity().state ? "on": "off"",
"outputPayloadType": "jsonata",
"x": 800,
"y": 120,
"wires": [
[
"fe415047eaa8e0b5"
],
[
"fe415047eaa8e0b5"
]
]
},
{
"id": "98288bbeb8a0ddcc",
"type": "ha-entity",
"z": "8c257188.cebe",
"name": "Master Bedoom Radiator Switch",
"server": "1f21f301.8eaead",
"version": 2,
"debugenabled": false,
"outputs": 2,
"entityType": "switch",
"config": [
{
"property": "name",
"value": "Master Bedoom Radiator"
},
{
"property": "device_class",
"value": ""
},
{
"property": "icon",
"value": "mdi:fire"
},
{
"property": "unit_of_measurement",
"value": ""
},
{
"property": "state_class",
"value": ""
},
{
"property": "last_reset",
"value": ""
}
],
"state": "payload",
"stateType": "msg",
"attributes": [],
"resend": true,
"outputLocation": "payload",
"outputLocationType": "none",
"inputOverride": "allow",
"outputOnStateChange": true,
"outputPayload": "$entity().state ? "on": "off"",
"outputPayloadType": "jsonata",
"x": 810,
"y": 240,
"wires": [
[
"684fe0bcede0f0b0"
],
[
"684fe0bcede0f0b0"
]
]
},
{
"id": "fe415047eaa8e0b5",
"type": "function",
"z": "8c257188.cebe",
"name": "",
"func": "if (msg.outputType === "state change")\n{\n if (msg.payload === "off")\n {\n msg.payload = {"state_l2": "ON"}\n }\n else\n {\n msg.payload = {"state_l2": "OFF"}\n }\n}\nreturn msg\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1060,
"y": 120,
"wires": [
[
"bcc2785163d0398d"
]
]
},
{
"id": "cf25f6b6e6131389",
"type": "function",
"z": "8c257188.cebe",
"name": "",
"func": "if (msg.outputType === "state change")\n{\n if (msg.payload === "off")\n {\n msg.payload = {"state_l3": "ON"}\n }\n else\n {\n msg.payload = {"state_l3": "OFF"}\n }\n}\nreturn msg\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1060,
"y": 180,
"wires": [
[
"bcc2785163d0398d"
]
]
},
{
"id": "684fe0bcede0f0b0",
"type": "function",
"z": "8c257188.cebe",
"name": "",
"func": "if (msg.outputType === "state change")\n{\n if (msg.payload === "off")\n {\n msg.payload = {"state_l4": "ON"}\n }\n else\n {\n msg.payload = {"state_l4": "OFF"}\n }\n}\nreturn msg\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1060,
"y": 240,
"wires": [
[
"bcc2785163d0398d"
]
]
},
{
"id": "cfed63d03ae18c44",
"type": "comment",
"z": "8c257188.cebe",
"name": "Floor Radiator State",
"info": "",
"x": 90,
"y": 20,
"wires": []
},
{
"id": "2f2d4274.d04c7e",
"type": "mqtt-broker",
"name": "mosquitto",
"broker": "192.168.101.254",
"port": "1883",
"tls": "3e133b20.e7e384",
"clientid": "",
"autoConnect": true,
"usetls": false,
"compatmode": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "2",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "2",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "2",
"willPayload": "",
"willMsg": {},
"sessionExpiry": ""
},
{
"id": "1f21f301.8eaead",
"type": "server",
"name": "Home Assistant",
"version": 2,
"addon": false,
"rejectUnauthorizedCerts": false,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true,
"cacheJson": true,
"heartbeat": false,
"heartbeatInterval": 30
},
{
"id": "3e133b20.e7e384",
"type": "tls-config",
"name": "",
"cert": "",
"key": "",
"ca": "",
"certname": "m2mqtt_srv.crt",
"keyname": "m2mqtt_srv.key",
"caname": "m2mqtt_ca.crt",
"servername": "",
"verifyservercert": false
}
]
地暖控制,设定温度保存到Node-RED,input_select.floor_radiator是地暖模式选择,比设定温度低0.5℃打开,比设定温度高0.5℃关闭:
[
{
"id": "9e3d47a4.4310f8",
"type": "server-state-changed",
"z": "8c257188.cebe",
"name": "Floor Radiator On/Off",
"server": "1f21f301.8eaead",
"version": 3,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_select.floor_radiator",
"entityidfiltertype": "exact",
"outputinitially": true,
"state_type": "str",
"haltifstate": "Auto",
"halt_if_type": "str",
"halt_if_compare": "is_not",
"outputs": 2,
"output_only_on_state_change": false,
"for": "2",
"forType": "num",
"forUnits": "seconds",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
}
],
"x": 540,
"y": 700,
"wires": [
[
"54a7fa86.e849f4"
],
[]
]
},
{
"id": "e7b940f0.f115c",
"type": "comment",
"z": "8c257188.cebe",
"name": "Floor Radiator Adjustment",
"info": "",
"x": 110,
"y": 300,
"wires": []
},
{
"id": "54a7fa86.e849f4",
"type": "function",
"z": "8c257188.cebe",
"name": "",
"func": "if (msg.payload === "On")\n{\n msg.payload = {\n "state_l1": "OFF",\n "state_l2": "OFF",\n "state_l3": "OFF",\n "state_l4": "OFF"\n }\n}\nelse if (msg.payload === "Off")\n{\n msg.payload = {\n "state_l1": "ON",\n "state_l2": "ON",\n "state_l3": "ON",\n "state_l4": "ON"\n }\n}\nreturn msg\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 740,
"y": 700,
"wires": [
[
"a22fec466d313560"
]
]
},
{
"id": "1f2cee88fabf3750",
"type": "function",
"z": "8c257188.cebe",
"name": "",
"func": "var living_room_target = global.get("living_room_target_temperature")\nif (msg.payload - living_room_target <= -0.5)\n{\n msg.payload = {"state_l2": "OFF"}\n}\nelse if (msg.payload - living_room_target >= 0.5)\n{\n msg.payload = {"state_l2": "ON"}\n}\nreturn msg\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 740,
"y": 540,
"wires": [
[
"a22fec466d313560"
]
]
},
{
"id": "a24ba35eef9b15a7",
"type": "function",
"z": "8c257188.cebe",
"name": "",
"func": "var second_bedroom_target = global.get("second_bedroom_target_temperature")\nif (msg.payload - second_bedroom_target <= -0.5)\n{\n msg.payload = {"state_l3": "OFF"}\n}\nelse if (msg.payload - second_bedroom_target >= 0.5)\n{\n msg.payload = {"state_l3": "ON"}\n}\nreturn msg\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 740,
"y": 780,
"wires": [
[
"a22fec466d313560"
]
]
},
{
"id": "8b53cfc6c990af12",
"type": "function",
"z": "8c257188.cebe",
"name": "",
"func": "var master_bedroom_target = global.get("master_bedroom_target_temperature")\nif (msg.payload - master_bedroom_target <= -0.5)\n{\n msg.payload = {"state_l4": "OFF"}\n}\nelse if (msg.payload - master_bedroom_target >= 0.5)\n{\n msg.payload = {"state_l4": "ON"}\n}\nreturn msg\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 740,
"y": 960,
"wires": [
[
"a22fec466d313560"
]
]
},
{
"id": "0a56be8e3dca840c",
"type": "function",
"z": "8c257188.cebe",
"name": "",
"func": "var study_target = global.get("study_target_temperature")\nif (msg.payload - study_target <= -0.5)\n{\n msg.payload = {"state_l1": "OFF"}\n}\nelse if (msg.payload - study_target >= 0.5)\n{\n msg.payload = {"state_l1": "ON"}\n}\nreturn msg\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 740,
"y": 360,
"wires": [
[
"a22fec466d313560"
]
]
},
{
"id": "1c47793686ebf9c5",
"type": "trigger-state",
"z": "8c257188.cebe",
"name": "Study Temperature",
"server": "1f21f301.8eaead",
"version": 1,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityid": "sensor.study_temperature",
"entityidfiltertype": "exact",
"debugenabled": false,
"constraints": [
{
"targetType": "entity_id",
"targetValue": "input_select.floor_radiator",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "Auto",
"propertyValue": "new_state.state"
}
],
"inputs": 0,
"outputs": 2,
"customoutputs": [],
"outputinitially": true,
"state_type": "num",
"enableInput": false,
"x": 550,
"y": 340,
"wires": [
[
"0a56be8e3dca840c"
],
[]
]
},
{
"id": "81dcc14ac597d1aa",
"type": "trigger-state",
"z": "8c257188.cebe",
"name": "Second Bedroom Temperature",
"server": "1f21f301.8eaead",
"version": 1,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityid": "sensor.second_bedroom_temperature",
"entityidfiltertype": "exact",
"debugenabled": false,
"constraints": [
{
"targetType": "entity_id",
"targetValue": "input_select.floor_radiator",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "Auto",
"propertyValue": "new_state.state"
}
],
"inputs": 0,
"outputs": 2,
"customoutputs": [],
"outputinitially": true,
"state_type": "num",
"enableInput": false,
"x": 520,
"y": 760,
"wires": [
[
"a24ba35eef9b15a7"
],
[]
]
},
{
"id": "a616eceb719ca501",
"type": "trigger-state",
"z": "8c257188.cebe",
"name": "Living Room Temperature",
"server": "1f21f301.8eaead",
"version": 1,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityid": "sensor.living_room_temperature",
"entityidfiltertype": "exact",
"debugenabled": false,
"constraints": [
{
"targetType": "entity_id",
"targetValue": "input_select.floor_radiator",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "Auto",
"propertyValue": "new_state.state"
}
],
"inputs": 0,
"outputs": 2,
"customoutputs": [],
"outputinitially": true,
"state_type": "num",
"enableInput": false,
"x": 530,
"y": 520,
"wires": [
[
"1f2cee88fabf3750"
],
[]
]
},
{
"id": "fd66bfa9c685a8fd",
"type": "trigger-state",
"z": "8c257188.cebe",
"name": "Master Bedroom Temperature",
"server": "1f21f301.8eaead",
"version": 1,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityid": "sensor.master_bedroom_temperature",
"entityidfiltertype": "exact",
"debugenabled": false,
"constraints": [
{
"targetType": "entity_id",
"targetValue": "input_select.floor_radiator",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "Auto",
"propertyValue": "new_state.state"
}
],
"inputs": 0,
"outputs": 2,
"customoutputs": [],
"outputinitially": true,
"state_type": "num",
"enableInput": false,
"x": 520,
"y": 940,
"wires": [
[
"8b53cfc6c990af12"
],
[]
]
},
{
"id": "bdfff05ea8935e38",
"type": "trigger-state",
"z": "8c257188.cebe",
"name": "Study Target Temperature",
"server": "1f21f301.8eaead",
"version": 1,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityid": "input_number.study_target_temperature",
"entityidfiltertype": "exact",
"debugenabled": false,
"constraints": [
{
"targetType": "entity_id",
"targetValue": "input_select.floor_radiator",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "Auto",
"propertyValue": "new_state.state"
}
],
"inputs": 0,
"outputs": 2,
"customoutputs": [],
"outputinitially": true,
"state_type": "num",
"enableInput": false,
"x": 190,
"y": 420,
"wires": [
[
"1fa54ffa96577ec5",
"14d884637680bd3c"
],
[
"14d884637680bd3c"
]
]
},
{
"id": "1fa54ffa96577ec5",
"type": "api-current-state",
"z": "8c257188.cebe",
"name": "Temperature",
"server": "1f21f301.8eaead",
"version": 3,
"outputs": 2,
"halt_if": "unavailable",
"halt_if_type": "str",
"halt_if_compare": "is_not",
"entity_id": "sensor.study_temperature",
"state_type": "num",
"blockInputOverrides": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": 0,
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 410,
"y": 400,
"wires": [
[
"d4fe115cc312b268"
],
[]
]
},
{
"id": "d4fe115cc312b268",
"type": "trigger",
"z": "8c257188.cebe",
"name": "",
"op1": "",
"op2": "",
"op1type": "nul",
"op2type": "payl",
"duration": "1",
"extend": true,
"overrideDelay": false,
"units": "s",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 580,
"y": 400,
"wires": [
[
"0a56be8e3dca840c"
]
]
},
{
"id": "14d884637680bd3c",
"type": "change",
"z": "8c257188.cebe",
"name": "",
"rules": [
{
"t": "set",
"p": "study_target_temperature",
"pt": "global",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 490,
"y": 460,
"wires": [
[]
]
},
{
"id": "d463f33e63970e3a",
"type": "trigger-state",
"z": "8c257188.cebe",
"name": "Second Bedroom Target Temperature",
"server": "1f21f301.8eaead",
"version": 1,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityid": "input_number.second_bedroom_target_temperature",
"entityidfiltertype": "exact",
"debugenabled": false,
"constraints": [
{
"targetType": "entity_id",
"targetValue": "input_select.floor_radiator",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "Auto",
"propertyValue": "new_state.state"
}
],
"inputs": 0,
"outputs": 2,
"customoutputs": [],
"outputinitially": true,
"state_type": "num",
"enableInput": false,
"x": 150,
"y": 840,
"wires": [
[
"86a4328441072962",
"edcf77442f0c1c21"
],
[
"edcf77442f0c1c21"
]
]
},
{
"id": "86a4328441072962",
"type": "api-current-state",
"z": "8c257188.cebe",
"name": "Temperature",
"server": "1f21f301.8eaead",
"version": 3,
"outputs": 2,
"halt_if": "unavailable",
"halt_if_type": "str",
"halt_if_compare": "is_not",
"entity_id": "sensor.second_bedroom_temperature",
"state_type": "num",
"blockInputOverrides": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": 0,
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 410,
"y": 820,
"wires": [
[
"a9b7f401b54dbf22"
],
[]
]
},
{
"id": "edcf77442f0c1c21",
"type": "change",
"z": "8c257188.cebe",
"name": "",
"rules": [
{
"t": "set",
"p": "second_bedroom_target_temperature",
"pt": "global",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 520,
"y": 880,
"wires": [
[]
]
},
{
"id": "a9b7f401b54dbf22",
"type": "trigger",
"z": "8c257188.cebe",
"name": "",
"op1": "",
"op2": "",
"op1type": "nul",
"op2type": "payl",
"duration": "1",
"extend": true,
"overrideDelay": false,
"units": "s",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 580,
"y": 820,
"wires": [
[
"a24ba35eef9b15a7"
]
]
},
{
"id": "42976cd28cd42754",
"type": "trigger-state",
"z": "8c257188.cebe",
"name": "Living Room Target Temperature",
"server": "1f21f301.8eaead",
"version": 1,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityid": "input_number.living_room_target_temperature",
"entityidfiltertype": "exact",
"debugenabled": false,
"constraints": [
{
"targetType": "entity_id",
"targetValue": "input_select.floor_radiator",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "Auto",
"propertyValue": "new_state.state"
}
],
"inputs": 0,
"outputs": 2,
"customoutputs": [],
"outputinitially": true,
"state_type": "num",
"enableInput": false,
"x": 170,
"y": 600,
"wires": [
[
"70b625c957c615d6",
"f093de5613e31fc7"
],
[
"f093de5613e31fc7"
]
]
},
{
"id": "70b625c957c615d6",
"type": "api-current-state",
"z": "8c257188.cebe",
"name": "Temperature",
"server": "1f21f301.8eaead",
"version": 3,
"outputs": 2,
"halt_if": "unavailable",
"halt_if_type": "str",
"halt_if_compare": "is_not",
"entity_id": "sensor.living_room_temperature",
"state_type": "num",
"blockInputOverrides": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": 0,
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 410,
"y": 580,
"wires": [
[
"a1b564387d8d1cdc"
],
[]
]
},
{
"id": "a1b564387d8d1cdc",
"type": "trigger",
"z": "8c257188.cebe",
"name": "",
"op1": "",
"op2": "",
"op1type": "nul",
"op2type": "payl",
"duration": "1",
"extend": true,
"overrideDelay": false,
"units": "s",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 580,
"y": 580,
"wires": [
[
"1f2cee88fabf3750"
]
]
},
{
"id": "f093de5613e31fc7",
"type": "change",
"z": "8c257188.cebe",
"name": "",
"rules": [
{
"t": "set",
"p": "living_room_target_temperature",
"pt": "global",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 500,
"y": 640,
"wires": [
[]
]
},
{
"id": "35313a2cc5d297e1",
"type": "trigger-state",
"z": "8c257188.cebe",
"name": "Master Bedroom Target Temperature",
"server": "1f21f301.8eaead",
"version": 1,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityid": "input_number.master_bedroom_target_temperature",
"entityidfiltertype": "exact",
"debugenabled": false,
"constraints": [
{
"targetType": "entity_id",
"targetValue": "input_select.floor_radiator",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "Auto",
"propertyValue": "new_state.state"
}
],
"inputs": 0,
"outputs": 2,
"customoutputs": [],
"outputinitially": true,
"state_type": "num",
"enableInput": false,
"x": 160,
"y": 1020,
"wires": [
[
"35e173ede1fbb8fb",
"dd9768f455088508"
],
[
"35e173ede1fbb8fb"
]
]
},
{
"id": "dd9768f455088508",
"type": "api-current-state",
"z": "8c257188.cebe",
"name": "Temperature",
"server": "1f21f301.8eaead",
"version": 3,
"outputs": 2,
"halt_if": "unavailable",
"halt_if_type": "str",
"halt_if_compare": "is_not",
"entity_id": "sensor.master_bedroom_temperature",
"state_type": "num",
"blockInputOverrides": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": 0,
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 410,
"y": 1000,
"wires": [
[
"ef16e1eaa5f0df50"
],
[]
]
},
{
"id": "ef16e1eaa5f0df50",
"type": "trigger",
"z": "8c257188.cebe",
"name": "",
"op1": "",
"op2": "",
"op1type": "nul",
"op2type": "payl",
"duration": "1",
"extend": true,
"overrideDelay": false,
"units": "s",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 580,
"y": 1000,
"wires": [
[
"8b53cfc6c990af12"
]
]
},
{
"id": "35e173ede1fbb8fb",
"type": "change",
"z": "8c257188.cebe",
"name": "",
"rules": [
{
"t": "set",
"p": "master_bedroom_target_temperature",
"pt": "global",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 520,
"y": 1060,
"wires": [
[]
]
},
{
"id": "a22fec466d313560",
"type": "mqtt out",
"z": "8c257188.cebe",
"name": "",
"topic": "zigbee2mqtt/KitchenRadiatorSwitch/set",
"qos": "2",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "2f2d4274.d04c7e",
"x": 1030,
"y": 700,
"wires": []
},
{
"id": "1f21f301.8eaead",
"type": "server",
"name": "Home Assistant",
"version": 2,
"addon": false,
"rejectUnauthorizedCerts": false,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true,
"cacheJson": true,
"heartbeat": false,
"heartbeatInterval": 30
},
{
"id": "2f2d4274.d04c7e",
"type": "mqtt-broker",
"name": "mosquitto",
"broker": "192.168.101.254",
"port": "1883",
"tls": "3e133b20.e7e384",
"clientid": "",
"autoConnect": true,
"usetls": false,
"compatmode": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "2",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "2",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "2",
"willPayload": "",
"willMsg": {},
"sessionExpiry": ""
},
{
"id": "3e133b20.e7e384",
"type": "tls-config",
"name": "",
"cert": "",
"key": "",
"ca": "",
"certname": "m2mqtt_srv.crt",
"keyname": "m2mqtt_srv.key",
"caname": "m2mqtt_ca.crt",
"servername": "",
"verifyservercert": false
}
]
空调辅助供热控制,input_select.aircon_mode是空调模式选择,switch.study_humidifier是湿度控制开关(也就是是否有人在,我用其他流程控制),比设定温度低1℃开启对应温度(比如设定24℃,空调就24℃),达到设定温度关闭:
[
{
"id": "1e8cc13c18be49a9",
"type": "api-call-service",
"z": "8c257188.cebe",
"name": "Heat 24°C",
"server": "1f21f301.8eaead",
"version": 3,
"debugenabled": false,
"service_domain": "xiaomi_miio_airconditioningcompanion",
"service": "climate_send_command",
"entityId": "climate.study_air_conditioning_companion",
"data": "{"command":"FE0000000000000000000000000600A322C90032003C00AC013001C5138833340201020101020201020101010101020102020101010101010101010101010101010201010101010102010201010101010101010101010101020101010101010101010101010101010101010101010101010101010101010101010101010101010201010101010101020201010201010102010202010201020101010101010100010000000000000000000000000000000000000000000000020002020002000205B7"}",
"dataType": "json",
"mergecontext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 890,
"y": 1340,
"wires": [
[]
]
},
{
"id": "e2b17a74544d9d6a",
"type": "api-call-service",
"z": "8c257188.cebe",
"name": "Heat 25°C",
"server": "1f21f301.8eaead",
"version": 3,
"debugenabled": false,
"service_domain": "xiaomi_miio_airconditioningcompanion",
"service": "climate_send_command",
"entityId": "climate.study_air_conditioning_companion",
"data": "{"command":"FE0000000000000000000000000600A322C90033003C00AB013001C5138833340201020101020201020101020101020102020101010101010101010101010101010201010101010102010201010101010101010101010101020101010101010101010101010101010101010101010101010101010101010101010101010101010201010101000101020201020201010002000202000200020000000000000000000000000000000000000000000000000000000000000000020002020002000205AC"}",
"dataType": "json",
"mergecontext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 890,
"y": 1400,
"wires": [
[]
]
},
{
"id": "9347aec3fab1a2d5",
"type": "api-call-service",
"z": "8c257188.cebe",
"name": "Heat 23°C",
"server": "1f21f301.8eaead",
"version": 3,
"debugenabled": false,
"service_domain": "xiaomi_miio_airconditioningcompanion",
"service": "climate_send_command",
"entityId": "climate.study_air_conditioning_companion",
"data": "{"command":"FE0000000000000000000000000600A322C90035003B00AA013101C313883334020102010102020101020202010102010202010101010101010101010101010101020101010101010201020101000101010101010100000002000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000202000202020000020200020200020002000000000000000000000000000000000000000000000100000101010101010102010202010201020587"}",
"dataType": "json",
"mergecontext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 890,
"y": 1280,
"wires": [
[]
]
},
{
"id": "3236c9bb9ad92b15",
"type": "switch",
"z": "8c257188.cebe",
"name": "Temperature",
"property": "study_aircon_temperature",
"propertyType": "global",
"rules": [
{
"t": "eq",
"v": "0",
"vt": "num"
},
{
"t": "eq",
"v": "22",
"vt": "num"
},
{
"t": "eq",
"v": "23",
"vt": "num"
},
{
"t": "eq",
"v": "24",
"vt": "num"
},
{
"t": "eq",
"v": "25",
"vt": "num"
}
],
"checkall": "true",
"repair": false,
"outputs": 5,
"x": 670,
"y": 1280,
"wires": [
[
"9c87630527aef10b"
],
[
"b7595ddf78b8333f"
],
[
"9347aec3fab1a2d5"
],
[
"1e8cc13c18be49a9"
],
[
"e2b17a74544d9d6a"
]
]
},
{
"id": "9c87630527aef10b",
"type": "api-call-service",
"z": "8c257188.cebe",
"name": "Off",
"server": "1f21f301.8eaead",
"version": 3,
"debugenabled": false,
"service_domain": "xiaomi_miio_airconditioningcompanion",
"service": "climate_send_command",
"entityId": "climate.study_air_conditioning_companion",
"data": "{"command":"FE0000000000000000000000000600A322C90032003A00AB013101C4138833340201020101020201020102010101010102020101010101010101010101010101010101010101010102010201010101010101010101010101010102010101010101010101010101010101010101010101010101010101010101010101010101010201010101020102010201010201020202010202010201020101010101010101010101010101010101010101010101010101010101010101020102020102010205D1"}",
"dataType": "json",
"mergecontext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 870,
"y": 1160,
"wires": [
[]
]
},
{
"id": "0d75d3d62f28e767",
"type": "function",
"z": "8c257188.cebe",
"name": "",
"func": "var study_target = global.get("study_target_temperature")\nvar study_aircon = global.get("study_aircon_temperature")\nif ( msg.payload - study_target <= -1 )\n{\n if (study_aircon != study_target)\n {\n global.set("study_aircon_temperature", study_target)\n return msg\n }\n}\nelse if ( msg.payload - study_target >= 0 )\n{\n if (study_aircon != 0)\n {\n global.set("study_aircon_temperature", 0)\n return msg\n }\n}\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 500,
"y": 1280,
"wires": [
[
"3236c9bb9ad92b15"
]
]
},
{
"id": "b5b27a6387cfa288",
"type": "trigger-state",
"z": "8c257188.cebe",
"name": "Study Temperature",
"server": "1f21f301.8eaead",
"version": 1,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityid": "sensor.study_temperature",
"entityidfiltertype": "exact",
"debugenabled": false,
"constraints": [
{
"targetType": "entity_id",
"targetValue": "input_select.floor_radiator",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "Auto",
"propertyValue": "new_state.state"
},
{
"targetType": "entity_id",
"targetValue": "input_select.aircon_mode",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "Off",
"propertyValue": "new_state.state"
},
{
"targetType": "entity_id",
"targetValue": "switch.study_humidifier",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "on",
"propertyValue": "new_state.state"
}
],
"inputs": 0,
"outputs": 2,
"customoutputs": [],
"outputinitially": true,
"state_type": "num",
"enableInput": false,
"x": 310,
"y": 1240,
"wires": [
[
"0d75d3d62f28e767"
],
[]
]
},
{
"id": "7d8bb6e2cedf0813",
"type": "comment",
"z": "8c257188.cebe",
"name": "AirCON Auxiliary Heating Adjustment",
"info": "",
"x": 140,
"y": 1120,
"wires": []
},
{
"id": "b7595ddf78b8333f",
"type": "api-call-service",
"z": "8c257188.cebe",
"name": "Heat 22°C",
"server": "1f21f301.8eaead",
"version": 3,
"debugenabled": false,
"service_domain": "xiaomi_miio_airconditioningcompanion",
"service": "climate_send_command",
"entityId": "climate.study_air_conditioning_companion",
"data": "{"command":"FE0000000000000000000000000600A322C90033003C00AB013201C0138833340200020000020200000202000000020002020000000000000000000000000000000200000000000002000200010000000000010001010001020101010101010101010101010101010101010101010101010101010101010101010101010101010201010101010102020102010201010202010202010201020101010101010101010101010101010101010101010101010101010101010101020102020102010205AB"}",
"dataType": "json",
"mergecontext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 890,
"y": 1220,
"wires": [
[]
]
},
{
"id": "fd1a731fa4452077",
"type": "switch",
"z": "8c257188.cebe",
"name": "Temperature",
"property": "second_bedroom_aircon_temperature",
"propertyType": "global",
"rules": [
{
"t": "eq",
"v": "0",
"vt": "num"
},
{
"t": "eq",
"v": "22",
"vt": "num"
},
{
"t": "eq",
"v": "23",
"vt": "num"
},
{
"t": "eq",
"v": "24",
"vt": "num"
},
{
"t": "eq",
"v": "25",
"vt": "num"
}
],
"checkall": "true",
"repair": false,
"outputs": 5,
"x": 750,
"y": 1580,
"wires": [
[
"18479a9653cba64b"
],
[
"51692eb669f4d8d0"
],
[
"c54307539e8ebbcf"
],
[
"8fb6bc743864f500"
],
[
"3276bdd2897c6ed8"
]
]
},
{
"id": "8fb6bc743864f500",
"type": "api-call-service",
"z": "8c257188.cebe",
"name": "Heat 24°C",
"server": "1f21f301.8eaead",
"version": 3,
"debugenabled": false,
"service_domain": "xiaomi_miio_airconditioningcompanion",
"service": "climate_send_command",
"entityId": "climate.second_bedroom_air_conditioning_companion",
"data": "{"command":"FE0000000000000000000000000900A422CD000700210036003B007D00A7013301BC1388666731042235222225252225223232222225322525223232322222222222222222222222252222222222222532252222222222253222222222222225222222222222222222222222222222222222222222222222222222222222222222222222222222252222222222222522252222252222252522252522252225222222222222222222222222222222222223222323232323232323232323232325232525232523252883"}",
"dataType": "json",
"mergecontext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 970,
"y": 1640,
"wires": [
[]
]
},
{
"id": "3276bdd2897c6ed8",
"type": "api-call-service",
"z": "8c257188.cebe",
"name": "Heat 25°C",
"server": "1f21f301.8eaead",
"version": 3,
"debugenabled": false,
"service_domain": "xiaomi_miio_airconditioningcompanion",
"service": "climate_send_command",
"entityId": "climate.second_bedroom_air_conditioning_companion",
"data": "{"command":"FE0000000000000000000000000500A322C8003600A8013101C1138822230100010000010100010000010000010001010000000000000000000000000000000100000000000001000100000000000100000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000100010100000001000101000100010000000000000000000000000000000000000000000000000000000000000000010001010001000104D2"}",
"dataType": "json",
"mergecontext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 970,
"y": 1700,
"wires": [
[]
]
},
{
"id": "c54307539e8ebbcf",
"type": "api-call-service",
"z": "8c257188.cebe",
"name": "Heat 23°C",
"server": "1f21f301.8eaead",
"version": 3,
"debugenabled": false,
"service_domain": "xiaomi_miio_airconditioningcompanion",
"service": "climate_send_command",
"entityId": "climate.second_bedroom_air_conditioning_companion",
"data": "{"command":"FE0000000000000000000000000600A322C90036003D00A7013301BC13883334020002000002020000020202000002000202000000000000000000000000000000020000000000000200020000000000020000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000200000202020000020200020200020002000000000000000000000000000101010101010101010101010101010101010102010202010201020566"}",
"dataType": "json",
"mergecontext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 970,
"y": 1580,
"wires": [
[]
]
},
{
"id": "18479a9653cba64b",
"type": "api-call-service",
"z": "8c257188.cebe",
"name": "Off",
"server": "1f21f301.8eaead",
"version": 3,
"debugenabled": false,
"service_domain": "xiaomi_miio_airconditioningcompanion",
"service": "climate_send_command",
"entityId": "climate.second_bedroom_air_conditioning_companion",
"data": "{"command":"FE0000000000000000000000000600A322C90032003A00AB013101C4138833340201020101020201020102010101010102020101010101010101010101010101010101010101010102010201010101010101010101010101010102010101010101010101010101010101010101010101010101010101010101010101010101010201010101020102010201010201020202010202010201020101010101010101010101010101010101010101010101010101010101010101020102020102010205D1"}",
"dataType": "json",
"mergecontext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 950,
"y": 1460,
"wires": [
[]
]
},
{
"id": "566bd7e7ddd22cf1",
"type": "function",
"z": "8c257188.cebe",
"name": "",
"func": "var second_bedroom_target = global.get("second_bedroom_target_temperature")\nvar second_bedroom_aircon = global.get("second_bedroom_aircon_temperature")\nif ( msg.payload - second_bedroom_target <= -1 )\n{\n if (second_bedroom_aircon != second_bedroom_target)\n {\n global.set("second_bedroom_aircon_temperature", second_bedroom_target)\n return msg\n }\n}\nelse if ( msg.payload - second_bedroom_target >= 0 )\n{\n if (second_bedroom_aircon != 0)\n {\n global.set("second_bedroom_aircon_temperature", 0)\n return msg\n }\n}\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 580,
"y": 1580,
"wires": [
[
"fd1a731fa4452077"
]
]
},
{
"id": "51692eb669f4d8d0",
"type": "api-call-service",
"z": "8c257188.cebe",
"name": "Heat 22°C",
"server": "1f21f301.8eaead",
"version": 3,
"debugenabled": false,
"service_domain": "xiaomi_miio_airconditioningcompanion",
"service": "climate_send_command",
"entityId": "climate.second_bedroom_air_conditioning_companion",
"data": "{"command":"FE0000000000000000000000000500A322C8003600A6013301BB138822230100010000010100000101000000010001010000000000000000000000000000000100000000000001000100000000000100000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000001000001000100000101000101000100010000000000000000000000000000000000000000000000000000000000000000010001010001000104CD"}",
"dataType": "json",
"mergecontext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 970,
"y": 1520,
"wires": [
[]
]
},
{
"id": "5bb72f29989ce279",
"type": "trigger-state",
"z": "8c257188.cebe",
"name": "Second Bedroom Temperature",
"server": "1f21f301.8eaead",
"version": 1,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityid": "sensor.second_bedroom_temperature",
"entityidfiltertype": "exact",
"debugenabled": false,
"constraints": [
{
"targetType": "entity_id",
"targetValue": "input_select.floor_radiator",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "Auto",
"propertyValue": "new_state.state"
},
{
"targetType": "entity_id",
"targetValue": "input_select.aircon_mode",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "Off",
"propertyValue": "new_state.state"
},
{
"targetType": "entity_id",
"targetValue": "switch.second_bedroom_humidifier",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "on",
"propertyValue": "new_state.state"
}
],
"inputs": 0,
"outputs": 2,
"customoutputs": [],
"outputinitially": true,
"state_type": "num",
"enableInput": false,
"x": 360,
"y": 1540,
"wires": [
[
"566bd7e7ddd22cf1"
],
[]
]
},
{
"id": "382aa37318ef1e1b",
"type": "api-current-state",
"z": "8c257188.cebe",
"name": "Temperature",
"server": "1f21f301.8eaead",
"version": 3,
"outputs": 2,
"halt_if": "unavailable",
"halt_if_type": "str",
"halt_if_compare": "is_not",
"entity_id": "sensor.study_temperature",
"state_type": "num",
"blockInputOverrides": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": 0,
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 330,
"y": 1320,
"wires": [
[
"0d75d3d62f28e767"
],
[]
]
},
{
"id": "33a004602f9b276f",
"type": "trigger-state",
"z": "8c257188.cebe",
"name": "Study Humidifier",
"server": "1f21f301.8eaead",
"version": 1,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityid": "switch.study_humidifier",
"entityidfiltertype": "exact",
"debugenabled": false,
"constraints": [
{
"targetType": "this_entity",
"targetValue": "",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "on",
"propertyValue": "new_state.state"
},
{
"targetType": "entity_id",
"targetValue": "input_select.floor_radiator",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "Auto",
"propertyValue": "new_state.state"
},
{
"targetType": "entity_id",
"targetValue": "input_select.aircon_mode",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "Off",
"propertyValue": "new_state.state"
}
],
"inputs": 0,
"outputs": 2,
"customoutputs": [],
"outputinitially": true,
"state_type": "str",
"enableInput": false,
"x": 140,
"y": 1300,
"wires": [
[
"382aa37318ef1e1b"
],
[]
]
},
{
"id": "465e7d994d3d0470",
"type": "trigger-state",
"z": "8c257188.cebe",
"name": "Study Target Temperature",
"server": "1f21f301.8eaead",
"version": 1,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityid": "input_number.study_target_temperature",
"entityidfiltertype": "exact",
"debugenabled": false,
"constraints": [
{
"targetType": "entity_id",
"targetValue": "input_select.floor_radiator",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "Auto",
"propertyValue": "new_state.state"
},
{
"targetType": "entity_id",
"targetValue": "input_select.aircon_mode",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "Off",
"propertyValue": "new_state.state"
},
{
"targetType": "entity_id",
"targetValue": "switch.study_humidifier",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "on",
"propertyValue": "new_state.state"
}
],
"inputs": 0,
"outputs": 2,
"customoutputs": [],
"outputinitially": true,
"state_type": "num",
"enableInput": false,
"x": 110,
"y": 1360,
"wires": [
[
"382aa37318ef1e1b"
],
[]
]
},
{
"id": "972b25e18efa3f35",
"type": "api-current-state",
"z": "8c257188.cebe",
"name": "Temperature",
"server": "1f21f301.8eaead",
"version": 3,
"outputs": 2,
"halt_if": "unavailable",
"halt_if_type": "str",
"halt_if_compare": "is_not",
"entity_id": "sensor.second_bedroom_temperature",
"state_type": "num",
"blockInputOverrides": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": 0,
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 410,
"y": 1620,
"wires": [
[
"566bd7e7ddd22cf1"
],
[]
]
},
{
"id": "7d1d93574a2c0fb1",
"type": "trigger-state",
"z": "8c257188.cebe",
"name": "Second Bedroom Humidifier",
"server": "1f21f301.8eaead",
"version": 1,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityid": "switch.second_bedroom_humidifier",
"entityidfiltertype": "exact",
"debugenabled": false,
"constraints": [
{
"targetType": "this_entity",
"targetValue": "",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "on",
"propertyValue": "new_state.state"
},
{
"targetType": "entity_id",
"targetValue": "input_select.floor_radiator",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "Auto",
"propertyValue": "new_state.state"
},
{
"targetType": "entity_id",
"targetValue": "input_select.aircon_mode",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "Off",
"propertyValue": "new_state.state"
}
],
"inputs": 0,
"outputs": 2,
"customoutputs": [],
"outputinitially": true,
"state_type": "str",
"enableInput": false,
"x": 180,
"y": 1600,
"wires": [
[
"972b25e18efa3f35"
],
[]
]
},
{
"id": "c08c28cdf267c52f",
"type": "trigger-state",
"z": "8c257188.cebe",
"name": "Second Bedroom Target Temperature",
"server": "1f21f301.8eaead",
"version": 1,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityid": "input_number.second_bedroom_target_temperature",
"entityidfiltertype": "exact",
"debugenabled": false,
"constraints": [
{
"targetType": "entity_id",
"targetValue": "input_select.floor_radiator",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "Auto",
"propertyValue": "new_state.state"
},
{
"targetType": "entity_id",
"targetValue": "input_select.aircon_mode",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "Off",
"propertyValue": "new_state.state"
},
{
"targetType": "entity_id",
"targetValue": "switch.second_bedroom_humidifier",
"propertyType": "current_state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "on",
"propertyValue": "new_state.state"
}
],
"inputs": 0,
"outputs": 2,
"customoutputs": [],
"outputinitially": true,
"state_type": "num",
"enableInput": false,
"x": 150,
"y": 1660,
"wires": [
[
"972b25e18efa3f35"
],
[]
]
},
{
"id": "1f21f301.8eaead",
"type": "server",
"name": "Home Assistant",
"version": 2,
"addon": false,
"rejectUnauthorizedCerts": false,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true,
"cacheJson": true,
"heartbeat": false,
"heartbeatInterval": 30
}
]
目前就这样
|
|