Unable to find entity ID for devices flashed with esphome

Hi,

I am trying to get the Deta Grid Connect Smart rewireable plug working with ESPHome. So far this is what I have done:

I have installed ESPHome and compile a binary bin file for flashing to the device via tuya-convert. The flashing went well. I have configured the device to have a static IP 192.168.3.200 and I can ping this ok at the commandline.

In ESPHome, the device is also detected. The logs are as follows:

INFO Reading configuration /config/exhaustfan.yaml...
INFO Starting log output from 192.168.3.200 using esphome API
INFO Connecting to 192.168.3.200:6053 (192.168.3.200)
INFO Successfully connected to 192.168.3.200
[07:10:59][I][app:100]: ESPHome version 1.14.3 compiled on Mar 15 2020, 02:50:50
[07:10:59][C][wifi:415]: WiFi:
[07:10:59][C][wifi:283]:   SSID: [redacted]
[07:10:59][C][wifi:284]:   IP Address: 192.168.3.200
[07:10:59][C][wifi:286]:   BSSID: [redacted]
[07:10:59][C][wifi:287]:   Hostname: 'exhaustfan'
[07:10:59][C][wifi:291]:   Signal strength: -64 dB ▂▄▆█
[07:10:59][C][wifi:295]:   Channel: 1
[07:10:59][C][wifi:296]:   Subnet: 255.255.255.0
[07:10:59][C][wifi:297]:   Gateway: 192.168.3.1
[07:10:59][C][wifi:298]:   DNS1: (IP unset)
[07:10:59][C][wifi:299]:   DNS2: (IP unset)
[07:10:59][C][logger:175]: Logger:
[07:10:59][C][logger:176]:   Level: DEBUG
[07:10:59][C][logger:177]:   Log Baud Rate: 115200
[07:10:59][C][logger:178]:   Hardware UART: UART0
[07:10:59][C][captive_portal:169]: Captive Portal:
[07:10:59][C][ota:029]: Over-The-Air Updates:
[07:10:59][C][ota:030]:   Address: 192.168.3.200:8266
[07:10:59][C][api:095]: API Server:
[07:10:59][C][api:096]:   Address: 192.168.3.200:6053

In Home Assistant -> Configuration -> Integrations, I use the “+” icon, and add this device. IT found the device as PLATFORMIO_ESP01_1M (expressif) and says “Success!”.

and if I click on Configuration in Home Assistant, I see under the Configured section, there is this item:
ESPHome: exhaust fan

when i click this, I see it will list the device name, manufacturer, model, area, integation name.

But if I go Configuration -> Entities, I don’t see this entity.

I know I am missing something but I am scratching my head at the moment.

Appreciate any help please.

My configuration.yaml is like this:

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
panel_iframe: !include panel_iframe.yaml

Thanks
Jo

Which entity are you looking for?

If you are looking for “exhaust_fan” you won’t find it.

you need to look for something like “switch.exhaust_fan” or “sensor.exhaust_fan” depending on which functionality the device exposes.

In configuration → Entities, all I see are the standard ones associated with Home Assistant. I can’t find the one that is associated with this exhaust fan.

For info. ESPHome show this as working:

Imgur

You name the device in the esphome configuration don’t you? Like I have an esphome called boiler but I named the switch in it ‘thermostat’ and it appears as switch.thermostat in homeassistant.

You’re searching for exhaustfan is like me searching for boiler, it’s not there because that’s the name of the esphome node, not the device it is exposing to homeassistant.

I don’t know for sure but I would guess that the “switch.exhaust_fan_ensuite” is the entity associated with that device. unless you have another different exhaust fan. :man_shrugging:

Thanks. I tried switch.exhaustfan and Home Assistant says the device is unavailable, so that’s not it.

Thanks. No that is a different exhaust fan.

Maybe post your esphome configuration.yaml. I see you added it to an area in devices, you don’t see the different device-entities there ?

Hi Francis,

Here is my exhaustfam.yaml in esphome.

esphome:
  name: exhaustfan
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: "redacted"
  password: "redacted"
  
  # Optional manual IP
  manual_ip:
    static_ip: 192.168.3.200
    gateway: 192.168.3.1
    subnet: 255.255.255.0

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

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

You haven’t configured anything for the board to control :man_shrugging:

Edit: I figured out. What a rookie silly mistake. The exhaustfan.yaml that I am looking at, should have these lines:

switch:
  - platform: gpio
    id: red_led
    pin:
      number: GPIO12
      inverted: true

  - platform: gpio
    name: "Brilliant Smart Plug"
    pin: GPIO5
    id: relay

    # Turn off red LED to show blue when turned on
    on_turn_on:
      - switch.turn_off: red_led

    # Turns on the red LED once the plug is turned off. Stock plug doesn't do this, to restore normal behavior remove the on_turn_on and on_turn_off
    # blocks.
    on_turn_off:
      - switch.turn_on: red_led

Now that I have added these, the entity is now listed in home assistant.

Ummm, you need to tell esphome what pins the device is connected to and what type of device it is.

So like on the bottom of what you have there you should have something like

switch:
  - pin: D5
    name: "Exhaust Fan" 
    inverted: flase

(those keys may not be even close to what they’re supposed to be, this is from memory)

*You ninja edited that whilst I was replying

1 Like

Thanks Marc for your pointers. I am so glad. Have been at this for hours today.

1 Like

Had a similar issue in Home-Assistant: device visible/active in ESPHome, but not present within “Entities”.

Solution: Main Menu > Notifications > “New devices discovered” … select appropriate device and hit “Configure”.