Get keypad information

Use this action to retrieve the current settings, firmware and hardware versions, and aggregate credential counts from a SwitchBot Keypad Vision or Keypad Vision Pro device.

Only counts of stored credentials are returned, such as the number of PINs, NFC cards, and fingerprints; no credential values or biometric data are exposed.

This action returns its result in a response variable, which you can use in later steps of the same automation or script.

Using this action from the user interface

If you prefer building automations and scripts visually, Home Assistant walks you through this action step by step. You pick what to target, tweak a few options, and save. No YAML knowledge required.

To get keypad information from an automation or a script:

  1. Go to Settings > Automations & scenes.
  2. Open an existing automation or script, or select Create to start a new one.
  3. If you’re setting up a new automation, add a trigger in the When section. Scripts don’t need a trigger.
  4. In the Then do section, select Add action.
  5. From the search box, search for and select SwitchBot Bluetooth: Get keypad information.
  6. Select the Device.
  7. Select Save.

Options in the UI

Device (Required)

The Keypad Vision device to get information from.

Using this action in YAML

If you work directly in YAML, or you want to know exactly what Home Assistant does under the hood, this section has the technical reference. It lists the field names you use in YAML, their types, and which ones are required. For how an automation or a script is built in YAML, refer to Automations in YAML and Scripts.

In YAML, refer to this action as switchbot.get_keypad_info. Store the result in a response variable so you can use it in later steps:

ActionAn action makes Home Assistant do something, for example, turn on a light, send a notification, or activate a scene. Automations and scripts run a list of actions. [Learn more]
action: switchbot.get_keypad_info
data:
  device_id: c2d01328efd261f586e56d914e3af07e
response_variable: keypad_info

This retrieves the information from the selected Keypad Vision device.

Options in YAML

device_id string Required

The device ID of the Keypad Vision device to get information from.

Response data

The response contains a basic_info map and a credential_counts map.

basic_info includes the following fields:

  • firmware: The firmware version.
  • hardware: The hardware version.
  • support_fingerprint: Whether the device supports fingerprint credentials.
  • lock_button_enabled: Whether the lock button is enabled.
  • backlight_enabled: Whether the keypad backlight is enabled.
  • backlight_level: The keypad backlight brightness level.
  • prompt_tone_enabled: Whether the prompt tone is enabled.

credential_counts includes the number of stored credentials of each type, such as pin, nfc, fingerprint, duress_pin, and duress_fingerprint. On Keypad Vision Pro devices, it also includes face and palm_vein.

A shortened example of the response looks like this:

basic_info:
  firmware: 2.4
  hardware: 22
  support_fingerprint: 1
  lock_button_enabled: true
  backlight_enabled: true
  backlight_level: 5
  prompt_tone_enabled: true
credential_counts:
  pin: 3
  nfc: 2
  fingerprint: 1
  duress_pin: 1
  duress_fingerprint: 0

Good to know

  • This action is available on SwitchBot Keypad Vision and Keypad Vision Pro devices.
  • This action is only invoked on demand; it is not part of the integration’s periodic polling, to avoid extra Bluetooth traffic.

Try it yourself

Ready to test this? Open Settings > Tools > Actions, search for this action, fill in the fields, and select Perform action. You see what happens on your actual entitiesAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more] without writing a line of YAML.

Still stuck?

To test the action on its own, run it in the automation editor with Run action, and check the message that it shows. To see what the action did when the automation ran, open the trace of that run. For details, refer to Testing automations. For common problems and their solutions, refer to Troubleshooting automations.

If that doesn’t help, the Home Assistant community is quick to help: join Discord for real-time chat, post on the community forum with the action you’re calling and what you expected to happen, or share on our subreddit /r/homeassistant.

Tip

AI assistants like ChatGPT or Claude can also explain actions or suggest the right one when you describe what you want in plain language.