Esp-Home "jumbled up" devices and entities

Hi,
New here first post no idea if I’m doing any of these category’s right :joy:.
I’ve been having this issue for a few weeks now and I can’t figure out the problem.
It seems to me like Esp home has jumbled up the entities and devices however some automations still work and some don’t I’ve attached some images to show what I mean.

So I made a IR remote esp so I can control my tv and Hifi all in one place so I don’t have multiple remotes to find every time I want to watch TV. So I made a picture element as shown in one of the photos, with a rough remote background and buttons placed over. It was all working perfectly fine until one day it didn’t, i don’t know what I changed to cause it to “break”.

When I click on the device which I named “ir-remote”, esp home now tells me that there is three devices. Two of which are completely different esp’s and the other being the ir remote and then there is three entities all three of which completely unrelated to the ir-remote and also unrelated to the two previously mentioned devices.

All in all I’m not sure what I’m doing wrong my picture element isn’t responding and I can’t seem to find the issue.

Here’s the code from the IR remote Esp:

esphome:
  name: "ir-remote"

esp8266:
  board: esp01_1m

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:


wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  manual_ip:
    static_ip: 192.168.0.102 
    gateway: 192.168.0.1
    subnet: 255.255.0.0

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "ir remote fallback"
    password: "jbm1qHjW95iU"

web_server:
  port: 80

remote_transmitter:
  pin: GPIO4
  carrier_duty_percent: 50%

switch:
  - platform: template
    name: "Samsung TV on/off"
    turn_on_action:
      remote_transmitter.transmit_samsung:
        data: 0xE0E040BF
        nbits: 32

  - platform: template
    name: "Samsung Source"
    turn_on_action:
      remote_transmitter.transmit_samsung:
        data: 0xE0E0807F
        nbits: 32

  - platform: template
    name: "Samsung Vol+"
    turn_on_action:
      remote_transmitter.transmit_samsung:
        data: 0xE0E0E01F
        nbits: 32

  - platform: template
    name: "Samsung Vol-"
    turn_on_action:
      remote_transmitter.transmit_samsung:
        data: 0xE0E0D02F
        nbits: 32
  - platform: template 
    name: "Samsung OK"
    turn_on_action:
      remote_transmitter.transmit_samsung:
        data: 0xE0E016E9
        nbits: 32







  - platform: template
    name: "Harman/Kardon on"
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x7080
        command: 0xC0

  - platform: template
    name: "Harman/Kardon off"
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x7080
        command: 0x9F

  - platform: template
    name: "Harman/Kardon aux"
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x7080
        command: 0xC5

  - platform: template
    name: "Harman/Kardon Vol+"
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x7080
        command: 0xC7

  - platform: template
    name: "Harman/Kardon Vol-"
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x7080
        command: 0xC8

  - platform: template
    name: "Harman/Kardon Screen dimm"
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x7080
        command: 0xDC

  - platform: template
    name: "Harman/Kardon mute"
    turn_on_action:
      remote_transmitter.transmit_nec:
        address: 0x7080
        command: 0xC1




captive_portal:

And then here is the code of the Picture element however I don’t believe that the problem lies here:

type: picture-elements
elements:
  - type: state-icon
    entity: switch.samsung_tv_on_off
    title: Samsung Power
    tap_action:
      action: toggle
    style:
      top: 7%
      left: 13%
  - type: state-icon
    entity: switch.harman_kardon_off
    title: Harman Power off
    tap_action:
      action: toggle
    style:
      top: 7%
      left: 37.5%
  - type: state-icon
    entity: switch.harman_kardon_on
    title: Harman Power on
    tap_action:
      action: toggle
    style:
      top: 7%
      left: 62.5%
  - type: state-icon
    entity: switch.harman_kardon_mute
    title: Harman Mute
    tap_action:
      action: toggle
    style:
      top: 7%
      left: 87%
  - type: state-icon
    entity: switch.samsung_vol
    title: Samsung Vol+
    tap_action:
      action: toggle
    style:
      top: 21.5%
      left: 13%
  - type: state-icon
    entity: switch.harman_kardon_vol
    title: Harman Vol+
    tap_action:
      action: toggle
    style:
      top: 21.5%
      left: 37.5%
  - type: state-icon
    entity: switch.samsung_vol_2
    title: Samsung Vol-
    tap_action:
      action: toggle
    style:
      top: 35.5%
      left: 13%
  - type: state-icon
    entity: switch.harman_kardon_vol_2
    title: Harman Vol-
    tap_action:
      action: toggle
    style:
      top: 35.5%
      left: 37.5%
  - type: state-icon
    entity: switch.samsung_source
    title: Samsung Source
    tap_action:
      action: toggle
    style:
      top: 50%
      left: 13%
  - type: state-icon
    entity: switch.samsung_ok
    title: Samsung OK
    tap_action:
      action: toggle
    style:
      top: 64%
      left: 13%
  - type: state-icon
    entity: switch.harman_kardon_aux
    title: Harman Aux
    tap_action:
      action: toggle
    style:
      top: 50%
      left: 37.5%
image: /local/IMG-20230123-WA0006.jpg

I’m not even sure if this is how to post code here, like I said first time using one of these forums usually managed everything myself :joy:
Oh and I forgot to mention, when I access the esp directly via my browser and the iP it works perfectly fine.







Welcome to the forums.

On first look I can’t see any obvious issues - but a question about your manual IP. Most routers have the default DHCP range start at 100, which would put this device inside that range. Maybe you have an address clash?

Meanwhile if you delete that device in integrations then re-add it when it’s discovered, does that fix the issue?

I tried deleting all the devices and readding them once discovered, which fixed all the entities of the devices which were rediscovered. However the IR remote doesn’t get detected/ rediscovered by Homeassistant. However it is online and I can control it via the web server. Just have to figure out why its not detected