ZHA Philips Motion Sensor (SML001) Timeout, Sens

Hey,

I am currently changing from Deconz to ZHA (with the Conbee2) and would also like to be able to adjust the settings for my sensors here. But I can’t find my way around. Unfortunately, I didn’t find any simple documentation.

So sensitivity and delay.

Can someone tell me which clusters/attributes I have to set and how if I want to change the delay from 8sec (default, I think) to 30 seconds? This also saves energy… :wink:

When I used ZHA (now firmly in the z2m camp), I had extracted the motion delay/sensitivity settings portions of the linked blueprint.

ZHA - Use Philips Hue SML001 as Occupancy Sensor for light control - Blueprints Exchange - Home Assistant Community (home-assistant.io)

My motion settings only version is below. It was always a quick and dirty job, not meant for public consumption, but I don’t think can do any lasting harm.

YMMV. Use at your own risk.

blueprint:
  name: SML001 Sensitivity and Timeout
  description: |
    The basic occupancy sensor automation does the following:
    The sets the sensor attributes when Home Assistant boots
  domain: automation
  input:
    occupancy_entity:
      name: Occupancy Sensor
      description: "The occupancy sensor to use for this automation"
      selector:
        entity:
          domain: binary_sensor
          device_class: occupancy
    ieee_id:
      name: Occupancy Sensor Zigbee IEEE ID
      description: "The zigbee network id of the sensor"
      selector:
        text:
    o_to_u_delay:
      name: Occupied to Unoccupied delay
      description: |
        Set the time in seconds we require the light(s) to stay on.
        This delay is reset each time motion is detected.
      default: 180
      selector:
        number:
          min: 10
          max: 600
          step: 5
          #mode: box
          unit_of_measurement: "seconds"
    sensitivity:
      name: Sensitivity of sensor
      description: |
        Set how sensitive we want the sensor to be: 0 = least sensitive

        NOTE: Restart Home Assistant on changing this value
      default: 2
      selector:
        number:
          min: 0
          max: 2

#
# The automation
#
variables:
  ieee_id: !input ieee_id

# Trigger mode
mode: single

# Trigger
trigger:
  # When HA starts
  - platform: homeassistant
    event: start

# Actions
# TODO: Figure out how to get ieee address of sensor from entity
action:
  - alias: "What caused the trigger?"
    choose:
      - conditions:
          - condition: template
            value_template: "{{ true }}"
        sequence:
          # Set device occupancy off delay
          - service: zha.set_zigbee_cluster_attribute
            data:
              ieee: "{{ ieee_id }}"
              endpoint_id: 2
              cluster_id: 0x0406
              cluster_type: in
              attribute: 0x0010
              value: !input o_to_u_delay
          # Set device sensitivity
          - service: zha.set_zigbee_cluster_attribute
            data:
              ieee: "{{ ieee_id }}"
              endpoint_id: 2
              cluster_id: 0x0406
              cluster_type: in
              attribute: 0x0030
              value: !input sensitivity
    default: []
1 Like

Perfect, it works! Thank you!