ESP Device's online but it's web page missing switches after updates

I have been converting some of my Tasmota 12v light switches over to ESPhome after finally getting my head around configuring them as stand alone devices while maintaining the same functions. One of the reasons I used Tasmota was because I could use the device webpage to control functions while “offline” as a backup for emergency’s

I have been kicking around a light dimmer idea along with the relay control and was able to dim and turn on and off the relay from the device page.
however I took a break away from it a week or 2 ago and had some time to play again…

here is my code that worked the last time I worked on it. as I remember since then 2 ESP builder updates have been pushed… and I’m unable to locate any changes relating to the web server core or I’m just blind and now keep falling down the same rabbit hole.

substitutions:

  device_name: light-dimmer
  friendly_name: "light-dimmer"
  device_description: "dimmer for 12v lights using FET"
  
  # light Name
  light1: test_light

  relay1: "relay"

# GPIO output pins
  relay1o: "GPIO01"

# GPIO input pins for buttons
  relay1i: "GPIO03"

# GPIO output pin for led FET
  bled: "GPIO00"


esphome:
  name: ${device_name}
  comment: ${device_description}
  friendly_name: ${friendly_name}
  name_add_mac_suffix: True


esp8266:
  board: esp01_1m

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: !secret hass_encryption_key
ota:
  - platform: esphome
    password: !secret ota_key

wifi:
  networks:
  - ssid: !secret wifi_ssid
    password: !secret wifi_password
  fast_connect: true

  # Optional manual IP
  manual_ip:
   static_ip: 192.168.10.58
   gateway: 192.168.10.1
   subnet: 255.255.255.0

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: ${friendly_name}
    password: !secret ap_key


########################################################################

# Enable Web server for easy monitoring
web_server:
  js_include: "./v2/www.js"
  js_url: ""
  version: 2
  include_internal: true
########################################################################

captive_portal:

output:
  - platform: esp8266_pwm
    pin: ${bled}
    inverted: true
    frequency: 1000 Hz
    id: pwm_output


switch:
  - platform: gpio
    pin: $relay1o
    inverted: true
    id: $relay1
    name: $relay1

binary_sensor:
  - platform: gpio
    pin:
      number: $relay1i
      inverted: true
      mode: INPUT_PULLUP
    filters:
      - delayed_on: 10ms
    on_press:
    - light.toggle: $light1
    name: $light1

light:
  - platform: monochromatic
    name: $light1
    id: $light1
    output: pwm_output
    default_transition_length: 2s

I have gone as far as pulling out an old laptop that I never used accessing any of the devices. so even as I have cleared browser cache etc… the tasmota devices all still work as expected web wise.
as well as HA controls devices as expected.
Im out of Ideas and would be grateful for others eyes to see that which I cannot

Was this as a result of breaking changes in the January 2026 ESPHome release?

Your binary_sensor and light components both have the same name $light1, I’d start by renaming one. Might not be your issue but worth a try.

Also your indentation is a bit strange around these lines.


    on_press:
    - light.toggle: $light1
    name: $light1

I’d move the light.toggle in a bit, ESPHome can be fussy with indentation.


    on_press:
     - light.toggle: $light1
    name: $light1

Do you really need substitutions for experimental setup with few components?
Can’t you just keep it simple until you have working setup?

it’s possible, I installed the updates as they came out but had not checked my device web pages until there was an issue with some of the devices, then I discovered the web page with out any controls that I used to control the system connected to the devices…

this device is just to experiment and find a solution without having to list out several hundred lines of YAML from the other devices that all share a common issue, none of the code for the other devices have changed since early DEC 25

this is the project that I was most concerned with: ESPHome component to monitor a Jikong Battery Management System

I have 4 batteries that I monitor and control via not only home assistant but also using the Device web page.

updated and flashed test device… no change to the web interface

thanks for spotting the indent… makes the code easier to follow.

so you renamed the light component?

yep.
no change other than the text in the web page

I don’t know what’s your approach here, but for my curiosity, what you get out with this?

esphome:
  name: light-dimmer
  

esp8266:
  board: esp01_1m

logger:
  baud_rate: 0

api:
  encryption:
    key: !secret hass_encryption_key

ota:
  password: !secret ota_key

wifi:
  networks:
    - ssid: !secret wifi_ssid
      password: !secret wifi_password
  fast_connect: true

  manual_ip:
    static_ip: 192.168.10.58
    gateway: 192.168.10.1
    subnet: 255.255.255.0

  ap:
    ssid: light-dimmer
    password: !secret ap_key

web_server:
  version: 2
  include_internal: true

captive_portal:

output:
  - platform: esp8266_pwm
    pin: GPIO00
    inverted: true
    frequency: 1000 Hz
    id: pwm_output

switch:
  - platform: gpio
    pin: GPIO01
    inverted: true
    id: relay
    name: "Relay"

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO03
      inverted: true
      mode: INPUT_PULLUP
    filters:
      - delayed_on: 10ms
    on_press:
      - light.toggle: test_light
    name: "Button binary sensor"
    id: test_light_button

light:
  - platform: monochromatic
    name: "Light"
    id: test_light
    output: pwm_output
    default_transition_length: 2s

Thank you that code works and gives the correct WEB page with working switches and slider for the dim function, there was one error

OTA requires

  • platform: esphome

but it is now as it was in December…

now I have to do is figure out the differences and how to fix the other project that I did not write that having the same issue.
Or… wait for that author to find and fix their own code… but that is not really the OPEN source way. I am a hardware guy… I build the systems and hack and slash the code to make it work.

Thank you…

ok, I got the other project web page working as it was before whatever changed recently…

My implementation using the copy and paste code from the ESPHome Docs was the cause… go figure. LOL

where as the simplified

web_server:
  version: 2
  include_internal: true

is the only change needed to the original codes

Again Thank you!.