esphome-blekeyboard icon indicating copy to clipboard operation
esphome-blekeyboard copied to clipboard

[question] How to add custom button to change iPad brightness?

Open and7ey opened this issue 6 months ago • 0 comments

I would like to change iPad brightness with BLE keyboard. Here is the discussion how to do it - https://github.com/T-vK/ESP32-BLE-Keyboard/issues/23.

I tried the following code:

ble_keyboard:
  id: blekeyboard
  name: "BLEKeyboard"
  battery_level: 50
  reconnect: true
  buttons: true
  use_default_libs: false

button:
  - platform: template
    name: "BRIGHTNESS_UP"
    id: brightness_up
    icon: "mdi:microsoft-windows"
    on_press:
      then:
        - ble_keyboard.press:
            id: blekeyboard
            code: 0x006F
        - ble_keyboard.release: blekeyboard   

but it doesn't work. Is there any other way to add this button?

  • ESPHome version: 2023.11.6
  • Component version: 2.3.1

and7ey avatar Dec 10 '23 11:12 and7ey