Automation with ESPhome nuki bridge batery level

Hi,
I control my Nuki 3 (not pro) wth an esp32 flushed with ESPhome firmware.
I’m trying to create an automation based on the bettery level of the locker.
I can see the bettery level in HA. I have tried to create an automation from the gui in 2 differnet ways but none is working (getting ‘Automation is unavailable’)
first way to define trigger:

 trigger:
    - platform: numeric_state
      entity_id:
        - sensor.esp_nuki_hub_nuki_battery_level
      below: 40
      above: 0.1

second definition:

  trigger:
    - type: battery_level
      platform: device
      device_id: <device_id>
      entity_id: <entity_id>
      domain: sensor
      below: 30

Can someone please advise?
Thanks!

Adding the error message from the ha logs:

[homeassistant.components.automation] Automation with alias 'notify: nuki battery is low' could not be validated and has been disabled: extra keys not allowed @ data['descripation']. Got ''

This is the action part in the script:

  action:
    - service: notify.mobile_phone
      data:
        message: Low battery!
        title: Nuki
  mode: single

The error is right there… you misspelled description.

f*** me… :rofl:
thanks!

1 Like