Lampie: Notifications on Multiple Switches for Home Assistant

I’ve spent the last few weeks converting a set of automations I had to an integration that I’d be able to share. The result is Lampie.

This allows you to quickly setup notifications that can be displayed on multiple Blue switches simultaneously. It currently only works for Blue switches set up with ZHA. That’s what I have and how I have it set up. I’d love to get it working with Z2M and Inovelli’s White & Red switches, too. I’ll probably need some help with that as I have no way to test and no experience with those. (In theory, it shouldn’t be too hard.)

It’s part of HACS default, so installing it should be pretty easy.

I hope some of you find this useful. Please report whatever you find doesn’t work quite right. Enjoy!

5 Likes

I also posted this over on the Home Assistant community forums.

This looks like an excellent integration, thank you for sharing! I’m looking forward to getting this configured for my switches. My next automation to-do was setting up LED notifications for our side gates being left open, you just made that a lot easier!

:heart:

I hope it works well for you. Please let me know if you have any problems with it.

Very cool! I use Z2M, and I’d be happy to try adding that functionality. I’m just slammed with a project for work for the next 3-4 weeks, so it might be a bit before I can set aside the time.

Great! No rush. I can try to get some refactoring in place to handle both ZHA and Z2M. It should mostly just be ensuring that we can listen for events and send messages. Then it needs some testing. Hopefully it’s not too much work.

I would suggest that you utilize the MQTT connection to listen to events and send messages. A couple of places I would start to look at:

  • My blueprint for managing button presses (it listens directly to MQTT events through Home Assistant)
  • This blueprint for handling notification commands through Z2M

Feel free to ping me on Github once you have some code available. I’m happy to review and test. For context, I’ve done a lot of work recently on the Z2M converters for Inovelli devices so I’m very familiar with how this stuff fits together. Unfortunately, I don’t really have the time in the next few weeks to help with development but should have time for review/testing.

2 Likes

This is awesome! Thank you for building it, and thank you for sharing!

I’m on Zigbee2MQTT, but I’m not a programmer. If you port it, I’ll be first in line to use it!

I’ve started a draft PR with some refactoring to try to pave the way for MQTT support here: Add MQTT support by wbyoung · Pull Request #2 · wbyoung/lampie · GitHub. I’ve noted a few differences between ZHA and Zigbee2MQTT thus far, but as expected, the differences are pretty minor.

I’ve only had time thus far to stub out some code for listening to MQTT events. I’ll come back and work through stubbing out for sending them as well.

I’ll try to get it to the point where there are some tests in place for sending/receiving messages over MQTT. The it’ll hopefully be pretty easy to tie it all together for @jncasey or anyone else who wants to take a stab at it.

This PR is now ready to have @rohan or @jncasey take over. Hopefully one of them can get it to the point that it works and gets merged!

1 Like

Porting is underway. I’ve got something written and verified using test code. It could work in theory. I’d guess there’s a 10% chance that it works without any changes, though. If you’re the adventurous type, you can try to install it by downloading the code from the current branch. If you haven’t done this type of install before, it’s more trouble than it’s worth. :slight_smile:

1 Like

I’ve got a PR for Red Series switches with a few TODOs as well:

It’s based on the work for getting Zigbee2MQTT working, so I’d like to get that one merged first. Like the Zigbee2MQTT PR, I’ll need some help confirming that things work. I’ll reach out in the community after we get further along on the Z2M work, but if anyone comes along and is curious/wants to help, ping me on GitHub.

I’ve completed preliminary work to get this integration working for Blue switches with Zigbee2MQTT, Red switches with Z-Wave JS, and White switches with Matter. I need a little help since I don’t have any of these devices.

To start, I need to know if there are additional entities created under the device in Home Assistant and what the entity registry has in it for them.

Zigbee2MQTT

  • A switch for local protection

  • A switch for disabling 2x tap to dismiss

Z-Wave JS

  • A switch for disabling 2x tap to dismiss

Matter

  • A switch for local protection

  • A switch for disabling 2x tap to dismiss

  • A light for the LED color and brightness

  • An event for tapping the config button

Screenshots would be useful, but best would be copying it the line out of /config/.storage/core.entity_registry with the entity ID in it for each of these above (and removing any sensitive info).

Any help you can provide would be very much appreciated. Thanks in advance! :heart_eyes:

Example of Useful Information

This is for a switch named Kitchen Overhead that I have, and an example of exactly the kind of info I’m looking for.

Unformatted entry from /config/.storage/core.entity_registry:

{"aliases":[],"area_id":null,"categories":{},"capabilities":null,"config_entry_id":"12ccb783ea6b484497585d992e6d14bb","config_subentry_id":null,"created_at":"1970-01-01T00:00:00+00:00","device_class":null,"device_id":"5b5cf4b35d1549ae8c25f9573372c973","disabled_by":null,"entity_category":"config","entity_id":"switch.kitchen_overhead_disable_config_2x_tap_to_clear_notifications","hidden_by":null,"icon":null,"id":"e6835e31efe445518dff482dfdd7cd65","has_entity_name":true,"labels":[],"modified_at":"2025-03-31T23:50:33.619982+00:00","name":null,"options":{"conversation":{"should_expose":false}},"original_device_class":null,"original_icon":null,"original_name":"Disable config 2x tap to clear notifications","platform":"zha","suggested_object_id":null,"supported_features":0,"translation_key":"disable_clear_notifications_double_tap","unique_id":"a4:f1:14:0f:31:2b:01:42-1-38183-disable_clear_notifications_double_tap","previous_unique_id":null,"unit_of_measurement":null}

Or formatted if you prefer:

{
  "aliases": [],
  "area_id": null,
  "categories": {},
  "capabilities": null,
  "config_entry_id": "12ccb783ea6b484497585d992e6d14bb",
  "config_subentry_id": null,
  "created_at": "1970-01-01T00:00:00+00:00",
  "device_class": null,
  "device_id": "5b5cf4b35d1549ae8c25f9573372c973",
  "disabled_by": null,
  "entity_category": "config",
  "entity_id": "switch.kitchen_overhead_disable_config_2x_tap_to_clear_notifications",
  "hidden_by": null,
  "icon": null,
  "id": "e6835e31efe445518dff482dfdd7cd65",
  "has_entity_name": true,
  "labels": [],
  "modified_at": "2025-03-31T23:50:33.619982+00:00",
  "name": null,
  "options": {
    "conversation": {
      "should_expose": false
    }
  },
  "original_device_class": null,
  "original_icon": null,
  "original_name": "Disable config 2x tap to clear notifications",
  "platform": "zha",
  "suggested_object_id": null,
  "supported_features": 0,
  "translation_key": "disable_clear_notifications_double_tap",
  "unique_id": "a4:f1:14:0f:31:2b:01:42-1-38183-disable_clear_notifications_double_tap",
  "previous_unique_id": null,
  "unit_of_measurement": null
}

And screenshots:

Here is info from Zigbee2MQTT

I have most of the additional entities disabled on my switches, but I enabled the ones you needed to get this info.





DoubleTapClearNotifications

{
  "aliases": [],
  "area_id": null,
  "categories": {},
  "capabilities": {
    "options": [
      "Enabled (Default)",
      "Disabled"
    ]
  },
  "config_entry_id": "8cc0b11750847171cc23ce5cf1a07f0c",
  "config_subentry_id": null,
  "created_at": "1970-01-01T00:00:00+00:00",
  "device_class": null,
  "device_id": "606f3abf9848ddca14a72747a34d2193",
  "disabled_by": null,
  "entity_category": "config",
  "entity_id": "select.kitchen_doubletapclearnotifications",
  "hidden_by": null,
  "icon": null,
  "id": "dcc86e2266da751b04af78c225cf54b9",
  "has_entity_name": true,
  "labels": [],
  "modified_at": "2025-07-23T04:36:42.224665+00:00",
  "name": null,
  "options": {
    "cloud.google_assistant": {
      "should_expose": false
    },
    "conversation": {
      "should_expose": false
    }
  },
  "original_device_class": null,
  "original_icon": null,
  "original_name": "DoubleTapClearNotifications",
  "platform": "mqtt",
  "suggested_object_id": null,
  "supported_features": 0,
  "translation_key": null,
  "unique_id": "0x0000000000000000_doubleTapClearNotifications_zigbee2mqtt",
  "previous_unique_id": null,
  "unit_of_measurement": null
}

LocalProtection

{
  "aliases": [],
  "area_id": null,
  "categories": {},
  "capabilities": {
    "options": [
      "Disabled",
      "Enabled"
    ]
  },
  "config_entry_id": "8cc0b11750847171cc23ce5cf1a07f0c",
  "config_subentry_id": null,
  "created_at": "1970-01-01T00:00:00+00:00",
  "device_class": null,
  "device_id": "606f3abf9848ddca14a72747a34d2193",
  "disabled_by": null,
  "entity_category": "config",
  "entity_id": "select.kitchen_localprotection",
  "hidden_by": null,
  "icon": null,
  "id": "aee87ca8b0383d95a13ead1532326740",
  "has_entity_name": true,
  "labels": [],
  "modified_at": "2025-07-23T04:37:00.457732+00:00",
  "name": null,
  "options": {
    "cloud.google_assistant": {
      "should_expose": false
    },
    "conversation": {
      "should_expose": false
    }
  },
  "original_device_class": null,
  "original_icon": null,
  "original_name": "LocalProtection",
  "platform": "mqtt",
  "suggested_object_id": null,
  "supported_features": 0,
  "translation_key": null,
  "unique_id": "0x0000000000000000_localProtection_zigbee2mqtt",
  "previous_unique_id": null,
  "unit_of_measurement": null
}

Also, there are sensor.* versions of each of these, but they are disabled by default when you add the switches.

If you need anything else let me know.

Thanks. That’s perfect. Hopefully those values are stable across various setups, but it looks like I can get the info I need easily.

I think that may be enough to try to get an alpha like release out that’ll be easy to install via HACS and see how far things go. I’ll post back here when I’ve got something new.

Hi all, I’ve posted an alpha release for MQTT support. I don’t know if it will work at all, but you can install it via HACS.

There are some requests in the release notes about how you could help test this out and get MQTT support added. I’ve copied them below for quick reference:

This is an alpha release with the goal of allowing a broad audience to test MQTT support. There has been no testing against physical devices. At this point, all testing has been done using a test suite, so this release may not work at all for MQTT.

Goals for those who install and test this alpha release, please enable debug logging.

logger:
  default: warning
  logs:
    custom_components.lampie: debug

Please upload your full log file to the GitHub pull request.

Also, please report back on the following:

  • Is the list of entities in the config entry is properly filtered to only Inovelli devices
  • Note whether enabling a solid notification works
  • Note whether enabling a notification with a custom LED config works, i.e. [222, 189, 166, 94, 53, 25, 0]
  • Note whether double pressing on the config button works to dismiss a notification

Thanks in advance! :tada:

1 Like

Just to verify, these don’t really start with 0x0000000000000000, do they? It’s something unique that you cleared?

You are correct, this is the unique ID of the switch.

Perfect. Just wanted to be sure I didn’t miss understand anything. Thanks for your help so far.

Just to be clear, this matches the ID in Z2M.
In my blueprint, I get this ID in from HA

{% set identifiers = device_attr(repeat.item, "identifiers") | first %}
{% set device_identifier = identifiers[1].split('_')[1] %}

Then I use that ID to publish the LED payload to MQTT

zigbee2mqtt/{{ device_identifier }}/set

I do this instead of using the name of the switch to avoid a mismatch when users rename the entity in HA and not in Z2M.

So two things I would take into account:

  • Not everyone uses the zigbee2mqtt path in MQTT as the base path, so I would make it configurable
  • I use this code to get the device_identifier in a template from an entity in my blueprint: {% set ns.topics = ns.topics + [ command_path_base + "/" + device_attr(id, 'name') ] %}. You should be able to do something similar
1 Like