Hello community,
i am happy to join this community. Let me know if I miss any rules of conduct!
But now my question:
I have connected a Aqara motion sensor via zigbe2mqtt to Homeassistant. I am using the “Event: State” node in NodeRed to react on state changes to turn on the light based on detected motion. Now i want to increase or decrease the light level based on the detected lux level of the motion sensor.
Here is a simple example of my actual setup (import it in node red):
[
{
"id": "7aed969a2bd869dc",
"type": "server-state-changed",
"z": "2c0a0e68adf6163b",
"name": "motion",
"server": "5e373819.692cb8",
"version": 5,
"outputs": 2,
"exposeAsEntityConfig": "",
"entityId": "binary_sensor.ankleidezimmer_bewegungssensor_occupancy",
"entityIdType": "exact",
"outputInitially": false,
"stateType": "str",
"ifState": "off",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "10",
"forType": "num",
"forUnits": "seconds",
"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": 90,
"y": 800,
"wires": [
[
"87dbbc7288472de4"
],
[
"2b69a334788c4b63"
]
]
},
{
"id": "2b69a334788c4b63",
"type": "api-call-service",
"z": "2c0a0e68adf6163b",
"name": "",
"server": "5e373819.692cb8",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_on",
"areaId": [],
"deviceId": [
"46f1fd5b9217a2cd1adb3aee68e93861"
],
"entityId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 290,
"y": 820,
"wires": [
[]
]
},
{
"id": "87dbbc7288472de4",
"type": "api-call-service",
"z": "2c0a0e68adf6163b",
"name": "",
"server": "5e373819.692cb8",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_off",
"areaId": [],
"deviceId": [
"46f1fd5b9217a2cd1adb3aee68e93861"
],
"entityId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 290,
"y": 760,
"wires": [
[]
]
},
{
"id": "5e373819.692cb8",
"type": "server",
"name": "Home Assistant",
"addon": true
}
]
The problem is that I can only read the value of the motion entity (binary_sensor.ankleidezimmer_bewegungssensor_occupancy).
How can I get all (or a specific) entity values from one single device in one payload?
Regards