Skip to content

Instantly share code, notes, and snippets.

@pszafer
Created October 1, 2020 11:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pszafer/70982f6e4847433cd92f0907bdf8fd00 to your computer and use it in GitHub Desktop.
Save pszafer/70982f6e4847433cd92f0907bdf8fd00 to your computer and use it in GitHub Desktop.
Temp automation in NR
[
{
"id": "d8b80ebb.d6fee",
"type": "switch",
"z": "11f0e03c.ef0f",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "gt",
"v": "29",
"vt": "num"
},
{
"t": "gt",
"v": "25",
"vt": "num"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 3,
"x": 950,
"y": 1140,
"wires": [
[
"fac5b9c4.9089a8"
],
[
"f7154.247f9ead"
],
[
"97dc2a0.9312dd8"
]
],
"outputLabels": [
"> 29 C",
"> 25 C",
"otherwise"
]
},
{
"id": "fac5b9c4.9089a8",
"type": "api-call-service",
"z": "11f0e03c.ef0f",
"name": "Call High speed",
"server": "5cf29b98.da0b54",
"version": 1,
"debugenabled": false,
"service_domain": "",
"service": "",
"entityId": "",
"data": "",
"dataType": "json",
"mergecontext": "",
"output_location": "",
"output_location_type": "none",
"mustacheAltTags": false,
"x": 1220,
"y": 1080,
"wires": [
[]
]
},
{
"id": "f7154.247f9ead",
"type": "api-call-service",
"z": "11f0e03c.ef0f",
"name": "Call Slow speed",
"server": "5cf29b98.da0b54",
"version": 1,
"debugenabled": false,
"service_domain": "",
"service": "",
"entityId": "",
"data": "",
"dataType": "json",
"mergecontext": "",
"output_location": "",
"output_location_type": "none",
"mustacheAltTags": false,
"x": 1220,
"y": 1140,
"wires": [
[]
]
},
{
"id": "97dc2a0.9312dd8",
"type": "api-call-service",
"z": "11f0e03c.ef0f",
"name": "Call Off speed",
"server": "5cf29b98.da0b54",
"version": 1,
"debugenabled": false,
"service_domain": "",
"service": "",
"entityId": "",
"data": "",
"dataType": "json",
"mergecontext": "",
"output_location": "",
"output_location_type": "none",
"mustacheAltTags": false,
"x": 1220,
"y": 1200,
"wires": [
[]
]
},
{
"id": "f078c466.656d18",
"type": "function",
"z": "11f0e03c.ef0f",
"name": "Check if time between 19-24",
"func": "const hour = new Date().getHours()\nif (hour > 18 && hour < 23){\n return msg\n}",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 720,
"y": 1140,
"wires": [
[
"d8b80ebb.d6fee"
]
]
},
{
"id": "a9bec538.d174a8",
"type": "server-state-changed",
"z": "11f0e03c.ef0f",
"name": "Outside temp",
"server": "5cf29b98.da0b54",
"version": 1,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "sensor.outdoor_temperature",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "num",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": true,
"x": 450,
"y": 1140,
"wires": [
[
"f078c466.656d18"
]
]
},
{
"id": "5cf29b98.da0b54",
"type": "server",
"z": "",
"name": "Home Assistant 11",
"legacy": false,
"addon": false,
"rejectUnauthorizedCerts": true,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true,
"cacheJson": true
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment