Using Osram Smart Mini Switch

Have a Osram Smart+ Mini Switch, and I have successfully paired it with my home assistant (I am using the zha integration with the CC2531 Stick), however the only thing I get is a battery sensor and nothing else, and the battery state is even “unknown”.
How to get a working quirk for zha and how to apply it in Homeassistant.
I found a related thread at https://github.com/Koenkk/zigbee2mqtt/issues/532 but can’t get it work.
Any help is appreciated. Thanks

1 Like

Hi, i have the same problem with ZHA. I receive “unknown” in state sensor.

The switch mini will not show up as a ‘switch’ purely because it isn’t. When the buttons are pressed they send events, which can be used in automation.

I did start working on a blueprint but real life took over. I did however get as far as making a log of most (all) of the ZHA events produced by the various buttons and use one in a simple test automation.

These are the events - the device _id, unique_id etc are specific to the unit:

To use in automations you need to use device_id and the ‘command’ associated with the button action.

UP BUTTON - QUICK PRESS

{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:0d:6f:00:0e:1b:5b:f9",
        "unique_id": "00:0d:6f:00:0e:1b:5b:f9:1:0x0006",
        "device_id": "4019ebaacc87d2ecf1470cdc238887e1",
        "endpoint_id": 1,
        "cluster_id": 6,
        "command": "on",
        "args": []
    },
    "origin": "LOCAL",
    "time_fired": "2021-04-07T15:40:39.101982+00:00",
    "context": {
        "id": "5d2e86a545f8bc060b68c2aec7c5aa7d",
        "parent_id": null,
        "user_id": null
    }
}

UP BUTTON - PRESS HOLD - 2 EVENTS

{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:0d:6f:00:0e:1b:5b:f9",
        "unique_id": "00:0d:6f:00:0e:1b:5b:f9:1:0x0008",
        "device_id": "4019ebaacc87d2ecf1470cdc238887e1",
        "endpoint_id": 1,
        "cluster_id": 8,
        "command": "stop",
        "args": []
    },
    "origin": "LOCAL",
    "time_fired": "2021-04-07T15:43:19.800770+00:00",
    "context": {
        "id": "ceb0f5700f06b82604d497c84c82ede0",
        "parent_id": null,
        "user_id": null
    }
}
Event 16 fired 16:43:
{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:0d:6f:00:0e:1b:5b:f9",
        "unique_id": "00:0d:6f:00:0e:1b:5b:f9:1:0x0008",
        "device_id": "4019ebaacc87d2ecf1470cdc238887e1",
        "endpoint_id": 1,
        "cluster_id": 8,
        "command": "move_with_on_off",
        "args": [
            0,
            38
        ]
    },
    "origin": "LOCAL",
    "time_fired": "2021-04-07T15:43:15.837604+00:00",
    "context": {
        "id": "6096c7ea1c50ce9c942f2274c4b8fc54",
        "parent_id": null,
        "user_id": null
    }
}

DOWN BUTTON QUICK PRESS

{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:0d:6f:00:0e:1b:5b:f9",
        "unique_id": "00:0d:6f:00:0e:1b:5b:f9:2:0x0006",
        "device_id": "4019ebaacc87d2ecf1470cdc238887e1",
        "endpoint_id": 2,
        "cluster_id": 6,
        "command": "off",
        "args": []
    },
    "origin": "LOCAL",
    "time_fired": "2021-04-07T15:41:18.075231+00:00",
    "context": {
        "id": "41b34b421264df7a57063e674a15f027",
        "parent_id": null,
        "user_id": null
    }
}

DOWN BUTTON PRESS-HOLD - 2 EVENTS

Event 1 fired 16:45:
{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:0d:6f:00:0e:1b:5b:f9",
        "unique_id": "00:0d:6f:00:0e:1b:5b:f9:2:0x0008",
        "device_id": "4019ebaacc87d2ecf1470cdc238887e1",
        "endpoint_id": 2,
        "cluster_id": 8,
        "command": "stop",
        "args": []
    },
    "origin": "LOCAL",
    "time_fired": "2021-04-07T15:45:08.887306+00:00",
    "context": {
        "id": "15c291a0f4e1e1b26e7a1aade5f6b866",
        "parent_id": null,
        "user_id": null
    }
}
Event 0 fired 16:45:
{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:0d:6f:00:0e:1b:5b:f9",
        "unique_id": "00:0d:6f:00:0e:1b:5b:f9:2:0x0008",
        "device_id": "4019ebaacc87d2ecf1470cdc238887e1",
        "endpoint_id": 2,
        "cluster_id": 8,
        "command": "move",
        "args": [
            1,
            38
        ]
    },
    "origin": "LOCAL",
    "time_fired": "2021-04-07T15:45:06.306214+00:00",
    "context": {
        "id": "1a45dca932b558096e67a6f071f3f496",
        "parent_id": null,
        "user_id": null
    }
}

MIDDLE BUTTON QUICK PRESS - 2 EVENTS

Event 3 fired 16:41:
{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:0d:6f:00:0e:1b:5b:f9",
        "unique_id": "00:0d:6f:00:0e:1b:5b:f9:3:0x0300",
        "device_id": "4019ebaacc87d2ecf1470cdc238887e1",
        "endpoint_id": 3,
        "cluster_id": 768,
        "command": "move_to_color_temp",
        "args": [
            370,
            10
        ]
    },
    "origin": "LOCAL",
    "time_fired": "2021-04-07T15:41:45.499029+00:00",
    "context": {
        "id": "877a65edc7c1405796eb4fae4e4e7ab5",
        "parent_id": null,
        "user_id": null
    }
}
Event 2 fired 16:41:
{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:0d:6f:00:0e:1b:5b:f9",
        "unique_id": "00:0d:6f:00:0e:1b:5b:f9:3:0x0008",
        "device_id": "4019ebaacc87d2ecf1470cdc238887e1",
        "endpoint_id": 3,
        "cluster_id": 8,
        "command": "move_to_level_with_on_off",
        "args": [
            254,
            10
        ]
    },
    "origin": "LOCAL",
    "time_fired": "2021-04-07T15:41:44.511755+00:00",
    "context": {
        "id": "a7c4224a086481bddf8907200d5e4d81",
        "parent_id": null,
        "user_id": null
    }
}

MIDDLE BUTTON PRESS-HOLD - 3 EVENTS

Event 4 fired 16:46:
{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:0d:6f:00:0e:1b:5b:f9",
        "unique_id": "00:0d:6f:00:0e:1b:5b:f9:3:0x0300",
        "device_id": "4019ebaacc87d2ecf1470cdc238887e1",
        "endpoint_id": 3,
        "cluster_id": 768,
        "command": "move_hue",
        "args": [
            0,
            0
        ]
    },
    "origin": "LOCAL",
    "time_fired": "2021-04-07T15:46:03.275054+00:00",
    "context": {
        "id": "d8bea336bcfc8c201a6be1b563eb4167",
        "parent_id": null,
        "user_id": null
    }
}
Event 3 fired 16:46:
{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:0d:6f:00:0e:1b:5b:f9",
        "unique_id": "00:0d:6f:00:0e:1b:5b:f9:3:0x0300",
        "device_id": "4019ebaacc87d2ecf1470cdc238887e1",
        "endpoint_id": 3,
        "cluster_id": 768,
        "command": "move_hue",
        "args": [
            1,
            25
        ]
    },
    "origin": "LOCAL",
    "time_fired": "2021-04-07T15:46:00.861111+00:00",
    "context": {
        "id": "b0f9b3c1292711f00f2e714c0ca00203",
        "parent_id": null,
        "user_id": null
    }
}
Event 2 fired 16:45:
{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:0d:6f:00:0e:1b:5b:f9",
        "unique_id": "00:0d:6f:00:0e:1b:5b:f9:3:0x0300",
        "device_id": "4019ebaacc87d2ecf1470cdc238887e1",
        "endpoint_id": 3,
        "cluster_id": 768,
        "command": "move_to_saturation",
        "args": [
            254,
            2
        ]
    },
    "origin": "LOCAL",
    "time_fired": "2021-04-07T15:45:59.880420+00:00",
    "context": {
        "id": "fac5f919937ae34a45f100db61925a93",
        "parent_id": null,
        "user_id": null

This is the automation using the the device_id and ‘on’ event to toggle a lamp

'alias: New Automation
description: ''
trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_id: 4019ebaacc87d2ecf1470cdc238887e1
      command: 'on'
condition: []
action:
  - service: switch.toggle
    target:
      entity_id: switch.sonoff_1000c6648e
mode: single