[
{
"id": "13a1667ffa659edf",
"type": "server-state-changed",
"z": "e56cc24c07e9fb83",
"name": "",
"server": "39747b58.21e974",
"version": 5,
"outputs": 2,
"exposeAsEntityConfig": "",
"entityId": "sun.sun",
"entityIdType": "exact",
"outputInitially": false,
"stateType": "str",
"ifState": "below_horizon",
"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": 680,
"y": 1600,
"wires": [
[
"b618a4aa5d309c67"
],
[
"1d7ca66cf44f2217"
]
]
},
{
"id": "030c82cb3f1734be",
"type": "api-current-state",
"z": "e56cc24c07e9fb83",
"name": "",
"server": "39747b58.21e974",
"version": 3,
"outputs": 2,
"halt_if": "below_horizon",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "sun.sun",
"state_type": "str",
"blockInputOverrides": false,
"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": 680,
"y": 1660,
"wires": [
[
"d6a921908832e78c",
"b618a4aa5d309c67"
],
[
"2b46a9b1892e9716",
"1d7ca66cf44f2217"
]
]
},
{
"id": "634c99a178e9971d",
"type": "inject",
"z": "e56cc24c07e9fb83",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 370,
"y": 1620,
"wires": [
[
"030c82cb3f1734be"
]
]
},
{
"id": "d6a921908832e78c",
"type": "debug",
"z": "e56cc24c07e9fb83",
"name": "debug 12",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 980,
"y": 1680,
"wires": []
},
{
"id": "2b46a9b1892e9716",
"type": "debug",
"z": "e56cc24c07e9fb83",
"name": "debug 13",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 980,
"y": 1720,
"wires": []
},
{
"id": "b618a4aa5d309c67",
"type": "api-call-service",
"z": "e56cc24c07e9fb83",
"name": "",
"server": "39747b58.21e974",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.sonoff_10005416d9_led"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1000,
"y": 1580,
"wires": [
[]
]
},
{
"id": "1d7ca66cf44f2217",
"type": "api-call-service",
"z": "e56cc24c07e9fb83",
"name": "",
"server": "39747b58.21e974",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.sonoff_10005416d9_led"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1000,
"y": 1640,
"wires": [
[]
]
},
{
"id": "6c56ed2411229334",
"type": "server-state-changed",
"z": "e56cc24c07e9fb83",
"name": "",
"server": "39747b58.21e974",
"version": 5,
"outputs": 2,
"exposeAsEntityConfig": "",
"entityId": "switch.sonoff_10005416d9_led",
"entityIdType": "exact",
"outputInitially": false,
"stateType": "str",
"ifState": "off",
"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": 260,
"y": 1680,
"wires": [
[
"030c82cb3f1734be"
],
[
"030c82cb3f1734be"
]
]
},
{
"id": "39747b58.21e974",
"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:s",
"enableGlobalContextStore": true
}
]