I just picked up one of these to test with. I have a couple of the old round Aqara buttons, but they are really hard to find and I like the idea of a larger capacity battery.
I have the following automation that works great with an NFC tag, but the wife and kids do not like to scan the tag and then complain. So, my plan is to add the switch or replace the tag altogether with the switch.
The problem… the button registers with 2 zha events as follows, it appears in the log book twice as well…
I have tried command: on , “on”, single and “single” but the automation never triggers on the button.
What am I doing wrong?
event_type: zha_event
data:
device_ieee: 28:2c:02:bf:ff:e3:8a:00
unique_id: 28:2c:02:bf:ff:e3:8a:00:1:0x0012
device_id: 18c287afedeebcc470917484edfc1408
endpoint_id: 1
cluster_id: 18
command: single
args:
value: 1
params: {}
origin: LOCAL
time_fired: "2023-11-29T04:07:32.982899+00:00"
context:
id: 01HGCM5EVPH0DKX2TQT7FRVE4Z
parent_id: null
user_id: null
event_type: zha_event
data:
device_ieee: 28:2c:02:bf:ff:e3:8a:00
unique_id: 28:2c:02:bf:ff:e3:8a:00:1:0x0006
device_id: 18c287afedeebcc470917484edfc1408
endpoint_id: 1
cluster_id: 6
command: "on"
args: []
params: {}
origin: LOCAL
time_fired: "2023-11-29T04:07:32.973656+00:00"
context:
id: 01HGCM5EVDDX53M0VXRERGTS12
parent_id: null
user_id: null
- id: nfc_bathroom_heat
alias: NFC bathroom heat
mode: restart
trace:
stored_traces: 10
trigger:
- platform: tag
tag_id: 5c75bdd6-20d2-4d08-a28b-a3944363782c
- platform: event
event_type: zha_event
event_data:
command: "single"
device_ieee: 28:2c:02:bf:ff:e3:8a:00
action:
- choose:
- conditions:
- condition: state
entity_id: switch.bathroom_heater
state: 'off'
- condition: time
after: '06:00:00'
before: '23:00:00'
sequence:
- service: switch.turn_on
entity_id: switch.bathroom_heater
- service: light.turn_on
entity_id: light.bathroom_1,light.bathroom_2
data:
brightness_pct: 100
kelvin: 5000
- service: timer.start
entity_id: timer.bathroom_heat_tag
- service: input_boolean.turn_on
target:
entity_id: input_boolean.notify_bathroom_tag
- service: timer.cancel
entity_id: timer.bathroom_motion_long
- service: timer.cancel
entity_id: timer.bathroom_motion_short
- service: system_log.write
data:
message: NFC Tag Bathroom scanned to turn on heat
# logger: automation Bathroom NFC tag scanned
### Late night tag scan test.
- conditions:
- condition: state
entity_id: switch.bathroom_heater
state: 'off'
- condition: time
after: '23:00:00'
before: '06:00:00'
sequence:
- service: switch.turn_on
entity_id: switch.bathroom_heater
- service: light.turn_on
entity_id: light.bathroom_1,light.bathroom_2,light.sink,light.tree_top,light.lamp1
data:
brightness_pct: 100
kelvin: 4000
# transition: 120
- service: timer.start
entity_id: timer.bathroom_heat_tag
- service: input_boolean.turn_on
target:
entity_id: input_boolean.notify_bathroom_tag
- service: timer.cancel
entity_id: timer.bathroom_motion_long
- service: timer.cancel
entity_id: timer.bathroom_motion_short
- service: system_log.write
data:
message: NFC Tag Bathroom scanned to turn on heat during late night
- conditions:
- condition: state
entity_id: switch.bathroom_heater
state: 'on'
sequence:
# - service: timer.finish
# entity_id: timer.bathroom_heat_tag
- service: switch.turn_off
entity_id: switch.bathroom_heater
- service: switch.turn_on
entity_id: light.bathroom_1,light.bathroom_2
- service: timer.start
entity_id: timer.bathroom_motion_short
- service: timer.cancel
entity_id: timer.bathroom_heat_tag
- service: input_boolean.turn_off
target:
entity_id: input_boolean.notify_bathroom_tag
- service: system_log.write
data:
message: NFC Tag Bathroom scanned to turn off heat