niklas‑stephan.de

Schlafzimmer Zigbee remote (Sonoff SNZB-01P) on ZHA

Last updated 05/11/2026 · homeassistant, zigbee, metis, iris

2026-10-21: HA and the ConBee II stick moved to iris; automations.yaml is now at /data/docker/HomeAssistant/config/ on iris (still root-owned, restart with docker restart homeassistant there). Niklas still has to press the remote once to confirm the lamp reacts after the move.

Device facts (verified 2026-10-19 from HA logs/registry on metis)

  • Zigbee network via ZHA + deCONZ-style USB dongle (/dev/ttyACM0, zigpy_deconz).
  • New remote: eWeLink/Sonoff SNZB-01P (IEEE b4:89:31:ff:fe:22:5b:8f, nwk 0x7157), joined successfully 2026-10-19 16:02, named “Schalter Decke”, area schlafzimmer, device id 2a1a455b52c75544cb46750ad00d505e.
  • Quirk zhaquirks.sonoff.button applied. Entities: battery, identify button, rssi/lqi, firmware update. No toggle entity — button presses only surface as ZHA device automation triggers:
    • short press → remote_button_short_press / subtype button / command toggle
    • double press → remote_button_double_press / command on
    • long press → remote_button_long_press / command off
  • Target light: light.deckenlampe_schlafzimmer (IEEE a4:c1:38:68:b4:28:0d:3e). Group light.lichter_schlafzimmer also exists.
  • Gotcha: in HA the remote looks “added but useless” until an automation with a device trigger (not an entity) is created; existing automations for the old remotes (e.g. 3d59f43cdef36cdddd0bd14932c1c261, Hue-style subtype: turn_on/turn_off) use the same pattern.

Wired up (2026-10-19, live in /data/docker/HomeAssistant/config/automations.yaml)

Three automations, entity ids automation.schlafzimmer_deckenlampe_fernbedienung_toggle|_an|_aus (all state on after restart): short press → light.toggle, double → light.turn_on, long → light.turn_off on light.deckenlampe_schlafzimmer. Backup of the previous file: /data/docker/HomeAssistant/automations.yaml.bak-20261019-pre-remote.

  • automations.yaml gotchas: every trigger item needs a **trigger: device** key in addition to type/device_id/domain (HA errors “required key not provided at ‘triggers[0].trigger’” otherwise), and an unquoted description: containing a colon makes the whole file fail to parse — quote descriptions.
  • automations.yaml is owned by root on metis; editing it needs sudo. HA only loads it at (re)start: docker restart homeassistant.
  • Confirmed working 2026-10-19 (Niklas pressed the remote; Deckenlampe toggles). HA’s default logger level does not record automation runs, so a successful press is not visible in home-assistant.log - enable DEBUG for homeassistant.components.automation in Settings → Logger if trigger events ever need to be traced.
  • light.deckenlampe_schlafzimmer is an innr RCL 232 C (device id 9178d1580572d2caeceb45bac0d48c20); it has transition/frequency config entities (_ein_ubergangszeit, _einschalthelligkeit etc.).

Source: Wiki.js