How to distinguish between multiple Switches of the same Model

I’ve had GPT help me create a pretty simple blueprint for a zigbee switch I got off of Temu, The blueprint works great, however it currently can’t distinguish different switches of the same model. I know that each switch has it’s own device_ieee however i’m not sure how to pull that info for the blueprint and gpt isn’t very helpful when I ask that question. Any and all help is welcome. Thanks!

Here is my current blueprint.

blueprint:
  name: Tuya TS0041 Single Short Press Action
  description: Automate actions with a Tuya TS0041 remote on a single short press.
  domain: automation
  input:
    tuya_ts0041_remote:
      name: Tuya TS0041 Remote
      description: Select the Tuya TS0041 remote to use with this automation.
      selector:
        device:
          integration: zha
          manufacturer: '_TZ3000_fa9mlvja'
          model: 'TS0041'
    button_short_press_action:
      name: Button Short Press Action
      description: Action to run on a single short press of the button.
      default: []
      selector:
        action: {}

trigger:
  platform: event
  event_type: zha_event
  event_data:
    endpoint_id: 1
    cluster_id: 6
    command: "remote_button_short_press"


action: !input 'button_short_press_action'

I just searched and there are at LEAST 4 blueprints in the exchange for this device.
Policy here is not to deal with anything GPT derived because it either does not work or the presenter has no idea what it is doing and wants a human to fix it or rewrite it for them.

I am going to suggest you look in the Blueprints exchange to see how others have done this. Look at their work for inspiration on how to continue.

How to help us help you - or How to ask a good question.

2 Likes

You’d have to change your trigger to use the device. Right now it’s a zha event, which doesn’t use the trigger. Instead it uses static information.

Every single blueprint i’ve seen for that model number here isn’t actually the correct device. this is a single button single press. Every blueprint I have seen here doesn’t work because it’s multi-button therefore not the correct model. I found one past that is the correct button but it uses Zigbee2MQTT instead of ZHA. GPT actually got me to a place where it will recognize the event. I just need it to recognize the correct button making the event.