I already have the following automation written and working, but this set of triggers and conditions does not care who scanned, on the state of devices. I would like to add another conditions section with this basic automation that would use the device_id of the device that was scanning to determine if it was my device and if it is my device then dismiss the next couple of alarms on my phone if the time is between 6:30am and 7:15am. The short side of the story is that I hate taking a shower at 7:05am and listening to my 7:15am or 7:25am alarm for 5 minutes each.
For the life of me, I cannot figure out how to use device_id as a condition rather than a trigger and other than reading on this site I have not started work on the alarm dismissal problem. It appears that I wrongly assumed that the tag scan would set a state that would contain the device_id until that tag was scanned again. I have 4 people who can and do scan this tag at random times during the day and do not want to mess with their android alarms at all. There is quite a bit more to this automation, but the first section is the key one I would use to dismiss alarms.
- id: nfc_bathroom_heat
alias: NFC bathroom heat
mode: restart
trace:
stored_traces: 10
trigger:
- platform: tag
tag_id: 5c75bdd6-20d2-4d08-a28b-a3944363782c
action:
- choose:
- conditions:
- condition: state
entity_id: switch.bathroom_heater
state: 'off'
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
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
Thanks Matt