Hello everyone,
I am trying to use an event state node to turn my AC after I have been away from home for 24h. I have been running some test with simple input boolean.
The behavior that I am after is:
- A switch is flipped when I leave home (off)
- Once I have been away for 24h (off for some delay)
- AC is turned off
I have done test with the delay set to 0 and I observe the expected behavior.
If I put in any sorts of delay though the “AC” never gets turned off.
[
{
"id": "0fd59973909db25d",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": "",
"env": []
},
{
"id": "cf2bc67d62f4f03b",
"type": "server-state-changed",
"z": "0fd59973909db25d",
"name": "Home",
"server": "27913f6aeb54c2be",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_boolean.test",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "off",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": 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": 270,
"y": 140,
"wires": [
[
"92822f545ba92080"
],
[]
]
},
{
"id": "92822f545ba92080",
"type": "api-current-state",
"z": "0fd59973909db25d",
"name": "Gone for 24h?",
"server": "27913f6aeb54c2be",
"version": 3,
"outputs": 2,
"halt_if": "off",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.test",
"state_type": "habool",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": "1",
"forType": "num",
"forUnits": "seconds",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 540,
"y": 120,
"wires": [
[
"86f4709d0fa85d4e"
],
[]
]
},
{
"id": "86f4709d0fa85d4e",
"type": "api-call-service",
"z": "0fd59973909db25d",
"name": "AC Off",
"server": "27913f6aeb54c2be",
"version": 5,
"debugenabled": true,
"domain": "input_boolean",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.delay"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 790,
"y": 120,
"wires": [
[]
]
},
{
"id": "27913f6aeb54c2be",
"type": "server",
"name": "Home Assistant",
"version": 5,
"addon": false,
"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": ": ",
"statusYear": "hidden",
"statusMonth": "short",
"statusDay": "numeric",
"statusHourCycle": "default",
"statusTimeFormat": "h:m",
"enableGlobalContextStore": false
}
]
Thank you
M.