Ikea switch triggering an Aquara switch

Hey,

I have a home-wide automated setup using mostly Ikea Tradfri bulbs and battery-powered buttons, plus one smart mains-powered Aqara (lumi.switch.n2aeu1) lights switch to control dumb bathroom lights. I’m using the popular Sonoff zigbee dongle for controlling these devices.

I’ve run into an issue where the one of the Ikea simple buttons (IKEA of Sweden TRADFRI on/off switch) started to control the Aqara switch. The configuration of the Ikea button is two automations, one run on a short click of the “On” button, one run on a short click of the “Off” button. Those work correctly, and allow me toggle two sets of my office lights.

After setting that up, and checking that the intended automation works correctly, I found myself puzzled because the same Ikea switch now started to directly control one of the two buttons of the Aqara light switch. Therefore, whenever I press the Ikea ON:

  1. A set of Office lights is toggled (correct)
  2. One of the lights in my bathroom turns on (unwanted)

and when I press the Ikea OFF button:

  1. The second set of Office lights is toggled (correct)
  2. The same light in my bathroom turns off (unwanted)

There don’t seem to be any related logs, despite enabling debug logging. Any ideas how to fix this?

Ikea switch info

{
  "data": {
    "ieee": "**REDACTED**",
    "nwk": 46656,
    "manufacturer": "IKEA of Sweden",
    "model": "TRADFRI on/off switch",
    "name": "IKEA of Sweden TRADFRI on/off switch",
    "quirk_applied": true,
    "quirk_class": "zhaquirks.ikea.twobtnremote.IkeaTradfriRemote2Btn",
    "quirk_id": null,
    "manufacturer_code": 4476,
    "power_source": "Battery or Unknown",
    "lqi": 117,
    "rssi": null,
    "last_seen": "2023-11-22T10:21:36",
    "available": true,
    "device_type": "EndDevice",
    "signature": {
      "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4476, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)",
      "endpoints": {
        "1": {
          "profile_id": "0x0104",
          "device_type": "0x0820",
          "input_clusters": [
            "0x0000",
            "0x0001",
            "0x0003",
            "0x0009",
            "0x0020",
            "0x1000",
            "0xfc7c"
          ],
          "output_clusters": [
            "0x0003",
            "0x0004",
            "0x0006",
            "0x0008",
            "0x0019",
            "0x0102",
            "0x1000"
          ]
        }
      },
      "manufacturer": "IKEA of Sweden",
      "model": "TRADFRI on/off switch"
    },
    "active_coordinator": false,
    "entities": [
      {
        "entity_id": "button.bedroom_button_identify_2",
        "name": "IKEA of Sweden TRADFRI on/off switch"
      },
      {
        "entity_id": "sensor.bedroom_button_battery_2",
        "name": "IKEA of Sweden TRADFRI on/off switch"
      }
    ],
    "neighbors": [],
    "routes": [],
    "endpoint_names": [
      {
        "name": "NON_COLOR_CONTROLLER"
      }
    ],
    "user_given_name": "Bedroom Button",
    "device_reg_id": "40ef6df11d69a395e33a8a465c9a26e0",
    "area_id": "bedroom",
    "cluster_details": {
      "1": {
        "device_type": {
          "name": "NON_COLOR_CONTROLLER",
          "id": 2080
        },
        "profile_id": 260,
        "in_clusters": {
          "0x0000": {
            "endpoint_attribute": "basic",
            "attributes": {
              "0x0004": {
                "attribute_name": "manufacturer",
                "value": "IKEA of Sweden"
              },
              "0x0005": {
                "attribute_name": "model",
                "value": "TRADFRI on/off switch"
              }
            },
            "unsupported_attributes": {}
          },
          "0x0001": {
            "endpoint_attribute": "power",
            "attributes": {
              "0x0021": {
                "attribute_name": "battery_percentage_remaining",
                "value": 200
              },
              "0x0033": {
                "attribute_name": "battery_quantity",
                "value": 1
              },
              "0x0034": {
                "attribute_name": "battery_rated_voltage",
                "value": 30
              },
              "0x0031": {
                "attribute_name": "battery_size",
                "value": 10
              },
              "0x0020": {
                "attribute_name": "battery_voltage",
                "value": 32
              }
            },
            "unsupported_attributes": {}
          },
          "0x0003": {
            "endpoint_attribute": "identify",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0009": {
            "endpoint_attribute": "alarms",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0020": {
            "endpoint_attribute": "poll_control",
            "attributes": {
              "0x0000": {
                "attribute_name": "checkin_interval",
                "value": 13200
              }
            },
            "unsupported_attributes": {}
          },
          "0x1000": {
            "endpoint_attribute": "lightlink",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0xfc7c": {
            "endpoint_attribute": "manufacturer_specific",
            "attributes": {},
            "unsupported_attributes": {}
          }
        },
        "out_clusters": {
          "0x0003": {
            "endpoint_attribute": "identify",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0004": {
            "endpoint_attribute": "groups",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0006": {
            "endpoint_attribute": "on_off",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0008": {
            "endpoint_attribute": "level",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0019": {
            "endpoint_attribute": "ota",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0102": {
            "endpoint_attribute": "window_covering",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x1000": {
            "endpoint_attribute": "lightlink",
            "attributes": {},
            "unsupported_attributes": {}
          }
        }
      }
    }
  }
}

Aqara switch info

 {
  "data": {
    "ieee": "**REDACTED**",
    "nwk": 57408,
    "manufacturer": "LUMI",
    "model": "lumi.switch.n2aeu1",
    "name": "LUMI lumi.switch.n2aeu1",
    "quirk_applied": true,
    "quirk_class": "zhaquirks.xiaomi.aqara.opple_switch.XiaomiOpple2ButtonSwitchFace2",
    "quirk_id": null,
    "manufacturer_code": 4447,
    "power_source": "Mains",
    "lqi": 123,
    "rssi": null,
    "last_seen": "2023-11-22T10:20:15",
    "available": true,
    "device_type": "Router",
    "signature": {
      "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.FullFunctionDevice|MainsPowered|RxOnWhenIdle|AllocateAddress: 142>, manufacturer_code=4447, maximum_buffer_size=127, maximum_incoming_transfer_size=100, server_mask=11264, maximum_outgoing_transfer_size=100, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)",
      "endpoints": {
        "1": {
          "profile_id": "0x0104",
          "device_type": "0x0000",
          "input_clusters": [
            "0x0000",
            "0x0002",
            "0x0003",
            "0x0004",
            "0x0005",
            "0x0006",
            "0x0009",
            "0x0012",
            "0x0702",
            "0xfcc0"
          ],
          "output_clusters": [
            "0x000a",
            "0x0019"
          ]
        },
        "2": {
          "profile_id": "0x0104",
          "device_type": "0x0000",
          "input_clusters": [
            "0x0000",
            "0x0003",
            "0x0004",
            "0x0005",
            "0x0006",
            "0x0012",
            "0xfcc0"
          ],
          "output_clusters": []
        },
        "21": {
          "profile_id": "0x0104",
          "device_type": "0x0100",
          "input_clusters": [
            "0x000c"
          ],
          "output_clusters": []
        },
        "31": {
          "profile_id": "0x0104",
          "device_type": "0x0100",
          "input_clusters": [
            "0x000c"
          ],
          "output_clusters": []
        },
        "41": {
          "profile_id": "0x0104",
          "device_type": "0x0100",
          "input_clusters": [
            "0x0012"
          ],
          "output_clusters": []
        },
        "42": {
          "profile_id": "0x0104",
          "device_type": "0x0100",
          "input_clusters": [
            "0x0012"
          ],
          "output_clusters": []
        },
        "51": {
          "profile_id": "0x0104",
          "device_type": "0x0100",
          "input_clusters": [
            "0x0012"
          ],
          "output_clusters": []
        },
        "61": {
          "profile_id": "0x0104",
          "device_type": "0x0100",
          "input_clusters": [
            "0x0012"
          ],
          "output_clusters": []
        },
        "242": {
          "profile_id": "0xa1e0",
          "device_type": "0x0061",
          "input_clusters": [],
          "output_clusters": [
            "0x0021"
          ]
        }
      },
      "manufacturer": "LUMI",
      "model": "lumi.switch.n2aeu1"
    },
    "active_coordinator": false,
    "entities": [
      {
        "entity_id": "button.bathroom_switch_identify",
        "name": "LUMI lumi.switch.n2aeu1"
      },
      {
        "entity_id": "switch.bathroom_switch_switch",
        "name": "LUMI lumi.switch.n2aeu1"
      },
      {
        "entity_id": "switch.bathroom_switch_switch_2",
        "name": "LUMI lumi.switch.n2aeu1"
      }
    ],
    "neighbors": [
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Parent",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0xBEE0",
        "permit_joining": "Unknown",
        "depth": "1",
        "lqi": "136"
      },
      {
        "device_type": "EndDevice",
        "rx_on_when_idle": "Off",
        "relationship": "Child",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0xE4FA",
        "permit_joining": "Unknown",
        "depth": "3",
        "lqi": "78"
      },
      {
        "device_type": "EndDevice",
        "rx_on_when_idle": "Off",
        "relationship": "Child",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0xB640",
        "permit_joining": "Unknown",
        "depth": "3",
        "lqi": "149"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0xA2C7",
        "permit_joining": "Unknown",
        "depth": "2",
        "lqi": "119"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x663E",
        "permit_joining": "Unknown",
        "depth": "2",
        "lqi": "81"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0xC08B",
        "permit_joining": "Unknown",
        "depth": "2",
        "lqi": "100"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x79FF",
        "permit_joining": "Unknown",
        "depth": "2",
        "lqi": "114"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x7773",
        "permit_joining": "Unknown",
        "depth": "2",
        "lqi": "118"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0xB1E9",
        "permit_joining": "Unknown",
        "depth": "2",
        "lqi": "73"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x6CCF",
        "permit_joining": "Unknown",
        "depth": "2",
        "lqi": "116"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x5FD7",
        "permit_joining": "Unknown",
        "depth": "2",
        "lqi": "114"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x166F",
        "permit_joining": "Unknown",
        "depth": "2",
        "lqi": "95"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x2B93",
        "permit_joining": "Unknown",
        "depth": "2",
        "lqi": "67"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x110E",
        "permit_joining": "Unknown",
        "depth": "2",
        "lqi": "77"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0xF670",
        "permit_joining": "Unknown",
        "depth": "2",
        "lqi": "83"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0xED2D",
        "permit_joining": "Unknown",
        "depth": "2",
        "lqi": "124"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x4E92",
        "permit_joining": "Unknown",
        "depth": "2",
        "lqi": "79"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x74E2",
        "permit_joining": "Unknown",
        "depth": "2",
        "lqi": "93"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x47DB",
        "permit_joining": "Unknown",
        "depth": "2",
        "lqi": "69"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x72E2",
        "permit_joining": "Unknown",
        "depth": "2",
        "lqi": "76"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x038F",
        "permit_joining": "Unknown",
        "depth": "2",
        "lqi": "86"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0xEA25",
        "permit_joining": "Unknown",
        "depth": "2",
        "lqi": "81"
      },
      {
        "device_type": "Coordinator",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x0000",
        "permit_joining": "Unknown",
        "depth": "0",
        "lqi": "92"
      }
    ],
    "routes": [
      {
        "dest_nwk": "0xBEE0",
        "route_status": "Active",
        "memory_constrained": false,
        "many_to_one": false,
        "route_record_required": false,
        "next_hop": "0xBEE0"
      },
      {
        "dest_nwk": "0x0000",
        "route_status": "Validation_Underway",
        "memory_constrained": false,
        "many_to_one": true,
        "route_record_required": false,
        "next_hop": "0x0000"
      },
      {
        "dest_nwk": "0x663E",
        "route_status": "Active",
        "memory_constrained": false,
        "many_to_one": false,
        "route_record_required": false,
        "next_hop": "0xEA25"
      },
      {
        "dest_nwk": "0x3DFB",
        "route_status": "Discovery_Underway",
        "memory_constrained": false,
        "many_to_one": false,
        "route_record_required": false,
        "next_hop": "0xFFFE"
      },
      {
        "dest_nwk": "0xE4FA",
        "route_status": "Validation_Underway",
        "memory_constrained": false,
        "many_to_one": false,
        "route_record_required": false,
        "next_hop": "0xE4FA"
      },
      {
        "dest_nwk": "0x5BF2",
        "route_status": "Discovery_Underway",
        "memory_constrained": false,
        "many_to_one": false,
        "route_record_required": false,
        "next_hop": "0xFFFE"
      },
      {
        "dest_nwk": "0x5FD7",
        "route_status": "Validation_Underway",
        "memory_constrained": false,
        "many_to_one": false,
        "route_record_required": false,
        "next_hop": "0x110E"
      },
      {
        "dest_nwk": "0x7773",
        "route_status": "Discovery_Underway",
        "memory_constrained": false,
        "many_to_one": false,
        "route_record_required": false,
        "next_hop": "0xFFFE"
      },
      {
        "dest_nwk": "0x038F",
        "route_status": "Discovery_Underway",
        "memory_constrained": false,
        "many_to_one": false,
        "route_record_required": false,
        "next_hop": "0xFFFE"
      },
      {
        "dest_nwk": "0x6CCF",
        "route_status": "Discovery_Underway",
        "memory_constrained": false,
        "many_to_one": false,
        "route_record_required": false,
        "next_hop": "0xFFFE"
      },
      {
        "dest_nwk": "0x47DB",
        "route_status": "Discovery_Underway",
        "memory_constrained": false,
        "many_to_one": false,
        "route_record_required": false,
        "next_hop": "0xFFFE"
      },
      {
        "dest_nwk": "0x8C26",
        "route_status": "Discovery_Underway",
        "memory_constrained": false,
        "many_to_one": false,
        "route_record_required": false,
        "next_hop": "0xFFFE"
      },
      {
        "dest_nwk": "0xB640",
        "route_status": "Validation_Underway",
        "memory_constrained": false,
        "many_to_one": false,
        "route_record_required": false,
        "next_hop": "0xB640"
      }
    ],
    "endpoint_names": [
      {
        "name": "ON_OFF_SWITCH"
      },
      {
        "name": "ON_OFF_SWITCH"
      },
      {
        "name": "ON_OFF_LIGHT"
      },
      {
        "name": "ON_OFF_LIGHT"
      },
      {
        "name": "ON_OFF_LIGHT"
      },
      {
        "name": "ON_OFF_LIGHT"
      },
      {
        "name": "ON_OFF_LIGHT"
      },
      {
        "name": "ON_OFF_LIGHT"
      },
      {
        "name": "PROXY_BASIC"
      }
    ],
    "user_given_name": "Bathroom Switch",
    "device_reg_id": "418cc438eeeb76dd475fe3d0edf75e35",
    "area_id": "bathroom",
    "cluster_details": {
      "1": {
        "device_type": {
          "name": "ON_OFF_SWITCH",
          "id": 0
        },
        "profile_id": 260,
        "in_clusters": {
          "0x0000": {
            "endpoint_attribute": "basic",
            "attributes": {
              "0x0004": {
                "attribute_name": "manufacturer",
                "value": "LUMI"
              },
              "0x0005": {
                "attribute_name": "model",
                "value": "lumi.switch.n2aeu1"
              }
            },
            "unsupported_attributes": {}
          },
          "0x0002": {
            "endpoint_attribute": "device_temperature",
            "attributes": {},
            "unsupported_attributes": {
              "0x0000": {
                "attribute_name": "current_temperature"
              }
            }
          },
          "0x0003": {
            "endpoint_attribute": "identify",
            "attributes": {},
            "unsupported_attributes": {
              "0xfffe": {
                "attribute_name": "reporting_status"
              }
            }
          },
          "0x0004": {
            "endpoint_attribute": "groups",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0005": {
            "endpoint_attribute": "scenes",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0006": {
            "endpoint_attribute": "on_off",
            "attributes": {
              "0x0000": {
                "attribute_name": "on_off",
                "value": 1
              }
            },
            "unsupported_attributes": {
              "0x4003": {
                "attribute_name": "start_up_on_off"
              }
            }
          },
          "0x0009": {
            "endpoint_attribute": "alarms",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0012": {
            "endpoint_attribute": "multistate_input",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0702": {
            "endpoint_attribute": "smartenergy_metering",
            "attributes": {},
            "unsupported_attributes": {
              "0x0300": {
                "attribute_name": "unit_of_measure"
              },
              "0x0301": {
                "attribute_name": "multiplier"
              },
              "0x0302": {
                "attribute_name": "divisor"
              },
              "0x0303": {
                "attribute_name": "summation_formatting"
              },
              "0x0304": {
                "attribute_name": "demand_formatting"
              },
              "0x0400": {
                "attribute_name": "instantaneous_demand"
              },
              "0x0306": {
                "attribute_name": "metering_device_type"
              },
              "0x0000": {
                "attribute_name": "current_summ_delivered"
              },
              "0x0100": {
                "attribute_name": "current_tier1_summ_delivered"
              },
              "0x0102": {
                "attribute_name": "current_tier2_summ_delivered"
              },
              "0x0104": {
                "attribute_name": "current_tier3_summ_delivered"
              },
              "0x0106": {
                "attribute_name": "current_tier4_summ_delivered"
              },
              "0x0108": {
                "attribute_name": "current_tier5_summ_delivered"
              },
              "0x010a": {
                "attribute_name": "current_tier6_summ_delivered"
              },
              "0x0200": {
                "attribute_name": "status"
              }
            }
          },
          "0xfcc0": {
            "endpoint_attribute": "opple_cluster",
            "attributes": {
              "0x0200": {
                "attribute_name": "operation_mode",
                "value": 0
              }
            },
            "unsupported_attributes": {}
          }
        },
        "out_clusters": {
          "0x000a": {
            "endpoint_attribute": "time",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0019": {
            "endpoint_attribute": "ota",
            "attributes": {},
            "unsupported_attributes": {}
          }
        }
      },
      "2": {
        "device_type": {
          "name": "ON_OFF_SWITCH",
          "id": 0
        },
        "profile_id": 260,
        "in_clusters": {
          "0x0000": {
            "endpoint_attribute": "basic",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0003": {
            "endpoint_attribute": "identify",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0004": {
            "endpoint_attribute": "groups",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0005": {
            "endpoint_attribute": "scenes",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0006": {
            "endpoint_attribute": "on_off",
            "attributes": {
              "0x0000": {
                "attribute_name": "on_off",
                "value": 1
              }
            },
            "unsupported_attributes": {
              "0x4003": {
                "attribute_name": "start_up_on_off"
              }
            }
          },
          "0x0012": {
            "endpoint_attribute": "multistate_input",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0xfcc0": {
            "endpoint_attribute": "opple_cluster",
            "attributes": {
              "0x0200": {
                "attribute_name": "operation_mode",
                "value": 0
              }
            },
            "unsupported_attributes": {}
          }
        },
        "out_clusters": {}
      },
      "21": {
        "device_type": {
          "name": "ON_OFF_LIGHT",
          "id": 256
        },
        "profile_id": 260,
        "in_clusters": {
          "0x000c": {
            "endpoint_attribute": "analog_input",
            "attributes": {},
            "unsupported_attributes": {}
          }
        },
        "out_clusters": {}
      },
      "31": {
        "device_type": {
          "name": "ON_OFF_LIGHT",
          "id": 256
        },
        "profile_id": 260,
        "in_clusters": {
          "0x000c": {
            "endpoint_attribute": "analog_input",
            "attributes": {},
            "unsupported_attributes": {}
          }
        },
        "out_clusters": {}
      },
      "41": {
        "device_type": {
          "name": "ON_OFF_LIGHT",
          "id": 256
        },
        "profile_id": 260,
        "in_clusters": {
          "0x0012": {
            "endpoint_attribute": "multistate_input",
            "attributes": {},
            "unsupported_attributes": {}
          }
        },
        "out_clusters": {}
      },
      "42": {
        "device_type": {
          "name": "ON_OFF_LIGHT",
          "id": 256
        },
        "profile_id": 260,
        "in_clusters": {
          "0x0012": {
            "endpoint_attribute": "multistate_input",
            "attributes": {},
            "unsupported_attributes": {}
          }
        },
        "out_clusters": {}
      },
      "51": {
        "device_type": {
          "name": "ON_OFF_LIGHT",
          "id": 256
        },
        "profile_id": 260,
        "in_clusters": {
          "0x0012": {
            "endpoint_attribute": "multistate_input",
            "attributes": {},
            "unsupported_attributes": {}
          }
        },
        "out_clusters": {}
      },
      "61": {
        "device_type": {
          "name": "ON_OFF_LIGHT",
          "id": 256
        },
        "profile_id": 260,
        "in_clusters": {
          "0x0012": {
            "endpoint_attribute": "multistate_input",
            "attributes": {},
            "unsupported_attributes": {}
          }
        },
        "out_clusters": {}
      },
      "242": {
        "device_type": {
          "name": "PROXY_BASIC",
          "id": 97
        },
        "profile_id": 41440,
        "in_clusters": {},
        "out_clusters": {
          "0x0021": {
            "endpoint_attribute": "green_power",
            "attributes": {},
            "unsupported_attributes": {}
          }
        }
      }
    }
  }
}

IKEA’s implementation of Zigbee has a non-standard addition to allow local control without a hub - the instructions usually show holding the remote next to a bulb to represent this option.

If you press the pair button too long / too many times / when a random event happens the remote pairs directly with the nearest device that responds.

For me, pairing a new IKEA remote sometimes paired not with my Zigbee coordnator, but with a nearby Lidl light bulb. The fix is to factory reset BOTH the controlled device and the remote and try again.

BTW - the IKEA factory reset sometimes isn’t a >10S press on the remote, but 4x presses in 5seconds or for light sources, toggle the main switch 6 times.

If this helps, :heart: this post!

3 Likes

Thank’s for the explanation, I’ll try a total reset for those two and report back.

Based on your answer, it seems like this might become a recurring problem. I was wondering, maybe there’s a way to turn this feature off via Zigbee Device Management?

It’s an IKEA device thing - and as the remote isn’t paired, you can’t access it to turn it off.

Oh, and when using IKEA devices with ZHA, I’d recommend OTA updates to fix many quirks (like terrible battery life):

I’ve performed a factory reset on both, paired and configured both last evening. Tested both, worked as expected.

Today morning I turn on the lights in my office, and I’m back at square one, the same thing has started to happen and the lights in the bathroom are on.

Any idea how to fix this? Or is my only way to chuck that particular Ikea remote in the trash and get a new one? That’s the only one with this issue, and I think it’s from an earlier hardware revision as some noticeable differences compared to other Ikea switches (different labeling inside, and the back screw is not held in place by within the backplate).

Update: It’s also worth mentioning that all my Ikea things are fully updated, I’ve actually been using the Ikea Tradfri, and then Dirigera hubs previously. I then had to migrate to HA due to their awful long-term reliability.

Are you sure it’s not the Aqara that’s the issue here?
I have some similar behaviour with a LIDL lamp that keeps connecting with unwanted devices, among them IKEA switches, or after some time it seems to forget its settings and I have to reset and rediscover it.
At first, I assumed the culprit to be an IKEA switch, but it turned out to be the lamp.