ESPHome device's button is being triggered by itself

Hi,

This is my first ESPHome device and there is something I can’t understand. I defined a button to action a task, and this button is being triggered by HA without my control.

The button is defined as below:

- platform: template
    id: blinds_open_button
    name: Blinds Open
    on_press:
      - remote_transmitter.transmit_pronto:
          transmitter_id: rf_tx
          data: >-
            ******

And the logging in the Activity tab shows something like below:

There are 3 events generated by me pressing the button, and they are showing By Daniel.
But the other events were generated by themselves. I can see two events per triggering, one with an orange badge and another without badge.

I have looked at events in the developer tools, but I can’t find any thing that explain this behavior. I don’t have any automation in HA nor in the ESPHome yml.

The full code for the ESPHome device is:

esphome:
  name: rf-proxy-blinds
  friendly_name: RF Proxy Blinds
  name_add_mac_suffix: false
  min_version: 2026.5.0

esp32:
  board: m5stack-atom
  framework:
    type: esp-idf

logger:

api:
  id: api_id
  encryption:
    key: *****

ota:
  - platform: esphome
    id: ota_esphome
    password: *****

wifi:
  ap:
  ssid: *****
  password: *****
  use_address: *****

captive_portal:

network:
  enable_ipv6: false

remote_transmitter:
  id: rf_tx
  pin: GPIO26
  carrier_duty_percent: 100%

button:
  - platform: factory_reset
    id: factory_reset_button
    name: "Factory Reset"
    entity_category: diagnostic
    disabled_by_default: true

  - platform: restart
    id: restart_button
    name: "Restart"
    entity_category: config
    disabled_by_default: true
    icon: "mdi:restart"

  - platform: template
    id: blinds_open_button
    name: Blinds Open
    on_press:
      - remote_transmitter.transmit_pronto:
          transmitter_id: rf_tx
          data: >-
            ******

After experimenting a lot, I could make a link between the device re-connecting to HA and the button being triggered.
The log from ESPHome’s device shows the following each time the button is triggered:

INFO Processing unexpected disconnect from ESPHome API for rf-proxy-blinds @ xx.xx.xx.xx
WARNING Disconnected from API
INFO Successfully resolved rf-proxy-blinds @ xx.xx.xx.xx in 0.000s
INFO Successfully connected to rf-proxy-blinds @ xx.xx.xx.xx in 0.013s
INFO Successful handshake with rf-proxy-blinds @ xx.xx.xx.xx in 0.062s

I haven’t personally used an RF transmitter, but I don’t see your code calling restart … so I wonder what is causing your device to reboot. I wonder if the RF transmission is trying to use more power than your power supply is giving it, and creating a brown-out ?

  • What is the Volts and Amps of the power supply you are using ?
  • What remote transmitter device are you using, and is it getting its power from your ESP device ?

I’m using the RF/IR kits from Ready-Made Projects - ESPHome - Smart Home Made Simple
M5Stack Atom Lite ESP32 Development Kit
M5Stack RF Unit 433MHz Transmitter (SYN115)

I don’t see anything on your esphome config that could trigger secretly template button. In any case it should show up on your esphome logs.

I have the same thing happening since the new HA update.
I’ve been trying to diagnose random disconnects on one of my Esphome devices. Since the last update every time the device reconnects there are ghost button presses in HA. This has not been happening prior to the update.