Entities not showing up in esphome device

Hello,

I’m trying to build an IR blaster using a wemos D1 mini. Ive attached an IR Reciever and IR transmitter to the board. I can succesfully read the IR codes from the receiver in the logs.

I’m now try to add button entities to home assistant to test the codes received.

The device has sucessfully added to home assistant but my entities are not listed, I can’t work out what I’ve missed after hours of googling and trial and error.

Here’s the code…

esphome:
  name: ir
  friendly_name: ir

esp8266:
  board: esp01_1m

# Enable logging
logger:
  level: VERBOSE

# Enable Home Assistant API
api:
  encryption:
    key: !secret ir_api

ota:
  - platform: esphome
    password: !secret ir_ota

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Ir Fallback Hotspot"
    password: "S37c9K8T0M9H"

captive_portal:

remote_receiver:
  pin:
    number: GPIO14
    inverted: true
  dump: all  

remote_transmitter:
  pin: GPIO13
  carrier_duty_percent: 50%

button:
  - platform: template
    name: "OnOff JVC"
    on_press:
      - remote_transmitter.transmit_jvc:
          data: 0x6804
  - platform: template
    name: "OnOff LG"
    on_press:
      - remote_transmitter.transmit_lg:
          data: 0x6804CD39
          nbits: 32
  - platform: template
    name: "OnOff NEC"
    on_press:
      - remote_transmitter.transmit_nec:
          address: 0x2016
          command: 0x9CB3

and heres how it looks in the settings…

Thanks

Have a look what you have under disabled entities

That just shows firmware… Only one entity.

I don’t think it’s related, but just in case, I experienced the exact same issue the other day and it turned out it was due to a bug in HA (GPS component using measurement_angle). I updated to the HA dev branch and it was resolved.

I found this by enabling debug logs on the esphome integration in HA and then adding the device - there was a clear Python stack trace related to esphome. Maybe try checking that?

I think it needs then: in the on_press section

There seems to be two variants in the documentations.

This one shows on_press, then.

Here it shows without the then.

Weird, on the button page there is an example with and without !

Worth a try adding it to see if works though

Anything shown in the logs on compile ?

Is it worth trying without API encryption to start with? I’d also remove from HA and let it discover again.

You mentioned that you attached a transmit/receive board, was it an ESP8285?

I have been experimenting with ESP8285s and in the beginning had similar issues with the device appearing with no entities. My code looked just like yours and it did not work to produce any entities, although I have code that works now that is virtually identical to yours, including the sections for remote_transmitter and remote_receiver (no then is required with on_press in my experience).

I would second the advice to remove it and add it back. Also to try a clean build if you haven’t. I think the issue I had was caused by a corrupted although reportedly successful install, and if I recall correctly I went back to the TTL cable and reinstalled that way with the boot jumper on the ESP8285.