Sorry erstmal für die lange Verzögerung. Du hast recht.
Ich benutze diesen von mir gebastelten “Standardflow” für alle meine Lampen:
Das funktioniert auch sehr gut und zuverlässig.
Aber jetzt möchte ich diese Lampe auch noch in Abhängigkeit von der Beleuchtungsstärke gedimmt einschalten. Dazu habe ich mir diesen Testflow gebastelt:
Auch der funktioniert für sich, ABER: wenn ich beide Flows zusammen führe, wird die Lampe bei jeder Helligkeitsänderung eingeschaltet, egal ob vorher Bewegung erkannt wurde oder nicht.
Also nochmal mit anderen Worten: ich möchte, dass die Lampe entsprechend der Beleuchtungsstärke gedimmt wird, aber nur wenn alle Bedingungen des ersten Flows erfüllt sind.
Hier der Export des ersten und zweiten Flows:
[
{
"id": "b7c64055c6ade44f",
"type": "server-state-changed",
"z": "d050ff2ffd818b35",
"name": "Schalter Automatik",
"server": "9ffe985a.1c24b8",
"version": 5,
"outputs": 1,
"exposeAsEntityConfig": "",
"entityId": "input_boolean.stablampe_automatik",
"entityIdType": "exact",
"outputInitially": true,
"stateType": "str",
"ifState": "",
"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": 130,
"y": 780,
"wires": [
[
"da2a377cd89c9284"
]
]
},
{
"id": "da2a377cd89c9284",
"type": "BooleanLogicUltimate",
"z": "d050ff2ffd818b35",
"name": "",
"payloadPropName": "payload",
"filtertrue": "both",
"persist": true,
"sInitializeWith": "false",
"triggertopic": "Bewegung",
"outputtriggeredby": "all",
"inputCount": "4",
"topic": "result",
"restrictinputevaluation": false,
"delayEvaluation": 0,
"translatorConfig": "",
"x": 470,
"y": 780,
"wires": [
[
"da71c080d1e65c67"
],
[],
[]
]
},
{
"id": "f52096b6b37a413f",
"type": "server-state-changed",
"z": "d050ff2ffd818b35",
"name": "Bewegung Essecke",
"server": "9ffe985a.1c24b8",
"version": 5,
"outputs": 1,
"exposeAsEntityConfig": "",
"entityId": "binary_sensor.bewegungsmelder_essecke_bewegung",
"entityIdType": "exact",
"outputInitially": true,
"stateType": "str",
"ifState": "",
"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": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
}
],
"x": 130,
"y": 660,
"wires": [
[
"799d6bec7ac54c5c"
]
]
},
{
"id": "b717a28c9c79c066",
"type": "server-state-changed",
"z": "d050ff2ffd818b35",
"name": "Schalter Urlaub",
"server": "9ffe985a.1c24b8",
"version": 5,
"outputs": 1,
"exposeAsEntityConfig": "",
"entityId": "input_boolean.urlaub",
"entityIdType": "exact",
"outputInitially": true,
"stateType": "str",
"ifState": "",
"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": 120,
"y": 720,
"wires": [
[
"0af645934df2fd7a"
]
]
},
{
"id": "0af645934df2fd7a",
"type": "InvertUltimate",
"z": "d050ff2ffd818b35",
"name": "Invert",
"payloadPropName": "payload",
"translatorConfig": "",
"x": 290,
"y": 720,
"wires": [
[
"da2a377cd89c9284"
]
]
},
{
"id": "1648c5c706d782b7",
"type": "trigger",
"z": "d050ff2ffd818b35",
"name": "",
"op1": "on",
"op2": "off",
"op1type": "str",
"op2type": "str",
"duration": "3",
"extend": true,
"overrideDelay": false,
"units": "min",
"reset": "",
"bytopic": "all",
"topic": "true",
"outputs": 1,
"x": 830,
"y": 780,
"wires": [
[
"bca2745a7a636d38"
]
]
},
{
"id": "799d6bec7ac54c5c",
"type": "looptimer",
"z": "d050ff2ffd818b35",
"duration": "10",
"units": "Second",
"maxloops": "10000",
"maxtimeout": "8",
"maxtimeoutunits": "Hour",
"name": "Repeater",
"x": 320,
"y": 660,
"wires": [
[
"da2a377cd89c9284"
],
[]
]
},
{
"id": "da71c080d1e65c67",
"type": "switch",
"z": "d050ff2ffd818b35",
"name": "1 if True",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "true"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 640,
"y": 780,
"wires": [
[
"1648c5c706d782b7"
]
]
},
{
"id": "83a944d491799f0a",
"type": "hysteresis",
"z": "d050ff2ffd818b35",
"name": "500/700 Lx",
"ThresholdType": "fixed",
"ThresholdRising": "700",
"ThresholdFalling": "500",
"TopicThreshold": "",
"TopicCurrent": "",
"ThresholdDeltaRising": "",
"ThresholdDeltaFalling": "",
"InitialMessage": true,
"OutRisingType": "bool",
"OutRisingValue": "false",
"OutFallingType": "bool",
"OutFallingValue": "true",
"OutTopicType": "str",
"OutTopicValue": "Licht",
"DynRaiseError": false,
"x": 330,
"y": 840,
"wires": [
[
"da2a377cd89c9284"
]
]
},
{
"id": "441508bc20ac1a8b",
"type": "server-state-changed",
"z": "d050ff2ffd818b35",
"name": "Beleuchtugsstärke",
"server": "9ffe985a.1c24b8",
"version": 5,
"outputs": 1,
"exposeAsEntityConfig": "",
"entityId": "sensor.bewegungsmelder_vallhorn_draussen_beleuchtungsstarke",
"entityIdType": "exact",
"outputInitially": true,
"stateType": "str",
"ifState": "",
"ifStateType": "num",
"ifStateOperator": "lt",
"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"
}
],
"x": 130,
"y": 840,
"wires": [
[
"83a944d491799f0a"
]
]
},
{
"id": "bca2745a7a636d38",
"type": "api-call-service",
"z": "d050ff2ffd818b35",
"name": "Testfunzel dimmen",
"server": "9ffe985a.1c24b8",
"version": 5,
"debugenabled": true,
"domain": "light",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"light.ikea_of_sweden_tradfribulbe27wwclear250lm_licht"
],
"data": "{ \"entity_id\": \"testfunzel_licht\", \"brightness\": {{payload}}}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [
{
"property": "select",
"propertyType": "msg",
"value": "sent data",
"valueType": "str"
}
],
"queue": "none",
"x": 1090,
"y": 780,
"wires": [
[]
]
},
{
"id": "9ffe985a.1c24b8",
"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",
"enableGlobalContextStore": true
}
]
2. Testflow:
[
{
"id": "4b1da3ba5f9fe093",
"type": "inject",
"z": "d050ff2ffd818b35",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "255",
"payloadType": "num",
"x": 110,
"y": 60,
"wires": [
[
"5ec90d92f96ffe74"
]
]
},
{
"id": "fae0137aa7be1ccf",
"type": "inject",
"z": "d050ff2ffd818b35",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "150",
"payloadType": "num",
"x": 110,
"y": 120,
"wires": [
[
"5ec90d92f96ffe74"
]
]
},
{
"id": "efd76309d243f87b",
"type": "inject",
"z": "d050ff2ffd818b35",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "60",
"payloadType": "num",
"x": 110,
"y": 180,
"wires": [
[
"5ec90d92f96ffe74"
]
]
},
{
"id": "ede379e81d8d11b7",
"type": "inject",
"z": "d050ff2ffd818b35",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "40",
"payloadType": "num",
"x": 110,
"y": 240,
"wires": [
[
"5ec90d92f96ffe74"
]
]
},
{
"id": "46d7475dea500d64",
"type": "inject",
"z": "d050ff2ffd818b35",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "20",
"payloadType": "num",
"x": 110,
"y": 300,
"wires": [
[
"5ec90d92f96ffe74"
]
]
},
{
"id": "c30a1227989ed05b",
"type": "inject",
"z": "d050ff2ffd818b35",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "2",
"payloadType": "num",
"x": 110,
"y": 360,
"wires": [
[
"5ec90d92f96ffe74"
]
]
},
{
"id": "fb23725e92385199",
"type": "api-call-service",
"z": "d050ff2ffd818b35",
"name": "Testfunzel dimmen",
"server": "9ffe985a.1c24b8",
"version": 5,
"debugenabled": true,
"domain": "light",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"light.ikea_of_sweden_tradfribulbe27wwclear250lm_licht"
],
"data": "{ \"entity_id\": \"testfunzel_licht\", \"brightness\": {{payload}}}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [
{
"property": "select",
"propertyType": "msg",
"value": "sent data",
"valueType": "str"
}
],
"queue": "none",
"x": 435.892333984375,
"y": 198.90277099609375,
"wires": [
[]
]
},
{
"id": "5ec90d92f96ffe74",
"type": "junction",
"z": "d050ff2ffd818b35",
"x": 260,
"y": 200,
"wires": [
[
"fb23725e92385199"
]
]
},
{
"id": "9ffe985a.1c24b8",
"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",
"enableGlobalContextStore": true
}
]
by HarryP: Codezeilen formatiert