I am trying to get a predicate match in a switch node to look up a device_ieee and determine the device type - in this case Hue v1 or Hue v2.
msg object has been supplemented with roominfo where the device_ieee can be looked up.
Switch node:
Property: roominfo.dimmers[device_ieee = payload.event.device_ieee].type
Msg object is:
{
"payload": {
"event_type": "zha_event",
"event": {
"device_ieee": "00:17:88:01:0b:59:ef:1a",
"unique_id": "00:17:88:01:0b:59:ef:1a:1:0xfc00",
"device_id": "aabffa27aa141698895a8f24c8f8d9f2",
"endpoint_id": 1,
"cluster_id": 64512,
"command": "on_short_release",
"args": {
"button": "on",
"press_type": "short_release",
"command_id": 0,
"args": [
1,
3145728,
2,
33,
1,
0
]
},
"params": {}
},
"origin": "LOCAL",
"time_fired": "2023-10-23T15:53:20.620406+00:00",
"context": {
"id": "01HDEKV6ZCX5J7BWM22RZ4SSDR",
"parent_id": null,
"user_id": null
}
},
"topic": "zha_event",
"room": "light.steves_office",
"_msgid": "0d5ca34c8bc903e2",
"roominfo": {
"area": "steves_office",
"dimmers": [
{
"name": "dimmer1",
"type": "Hue v1",
"device_ieee": "00:17:88:01:04:af:95:a0"
},
{
"name": "dimmer2",
"type": "Hue v2",
"device_ieee": "00:17:88:01:0b:59:ef:1a"
}
],
"illuminance_sensors": [
{
"name": "binary_sensor.steves_office_sensor_illuminance"
},
{
"name": "binary_sensor.steves_office_sensor2_illuminance"
}
],
"light": "light.steves_office",
"occupancy_sensors": [
{
"name": "binary_sensor.steves_office_sensor_occupancy"
},
{
"name": "binary_sensor.steves_office_sensor2_occupancy"
}
],
"occupancy_timer": "timer.steves_office_occupancy"
}
}
The switch node has output 1 == 'Hue v1' , output 2 == 'Hue v2',
But my message ends up in Otherwise..