Custom element doesn't exist sometimes, fixed with browser refresh?

Hi

I have a problem with Custom elements not loading sometimes and showing the “Custom element does not exist: some-custom-component-name”. The custom components are mostly installed via HACS.

Its happens every now and then and if I just refresh my browser it then loads the custom components.

This isn’t normally much of an issue and is just a bit of an irritation but using the Home Assistant Android app there is no way to refresh the view.

Any ideas as to how I could fix this would be greatly appreciated? Thanks in advance

Can you not pull down to refresh on the Android app?

That’s how it is done on iOS.

I can’t see your entire config for the cards in the screenshot so this may or may not help:

The Android app doesn’t have pull to refresh and looking into this I found another issue a few people had where the front end had a different issue so they had requested pull to refresh but the response was that they should rather get the fronted team ix the root cause so I assume the same would apply here.

Its quite a massive card config because its floor plans

cards:
  - elements:
      - entity: sensor.sun_brightness
        image: /local/floorplan/house_downstairs_dim.png
        state_filter:
          black: opacity(.60)
          bright: opacity(.0)
          dark: opacity(.35)
          mid: opacity(.2)
        style:
          left: 50%
          top: 50%
          width: 100%
        tap_action:
          action: none
        type: image
      - entity: light.switch_2_button_2
        hold_action: none
        state_image:
          'off': /local/floorplan/transparent_square.png
          'on': /local/floorplan/house_downstairs_kitchen.png
        style:
          left: 50%
          top: 50%
          width: 100%
        tap_action: none
        type: image
      - entity: light.switch_2_button_1
        hold_action: none
        state_image:
          'off': /local/floorplan/transparent_square.png
          'on': /local/floorplan/house_downstairs_counter.png
        style:
          left: 50%
          top: 50%
          width: 100%
        tap_action: none
        type: image
      - entity: light.switch_1_button_1
        hold_action: none
        state_image:
          'off': /local/floorplan/transparent_square.png
          'on': /local/floorplan/house_downstairs_frontdoor.png
        style:
          left: 50%
          top: 50%
          width: 100%
        tap_action: none
        type: image
      - entity: light.switch_3_button_2
        hold_action: none
        state_image:
          'off': /local/floorplan/transparent_square.png
          'on': /local/floorplan/house_downstairs_lounge.png
        style:
          left: 50%
          top: 50%
          width: 100%
        tap_action: none
        type: image
      - entity: light.switch_6_button_1
        hold_action: none
        state_image:
          'off': /local/floorplan/transparent_square.png
          'on': /local/floorplan/house_downstairs_office.png
        style:
          left: 50%
          top: 50%
          width: 100%
        tap_action: none
        type: image
      - conditions:
          - entity: light.downstairs
            state: 'on'
        elements:
          - image: /local/floorplan/house_downstairs_guest_bathroom.png
            style:
              left: 50%
              top: 50%
              width: 100%
            type: image
        type: conditional
      - conditions:
          - entity: light.downstairs
            state: 'on'
        elements:
          - image: /local/floorplan/house_downstairs_bedroom.png
            style:
              left: 50%
              top: 50%
              width: 100%
            type: image
        type: conditional
      - entity: sensor.downstairs_temperature
        style:
          color: white
          left: 55%
          top: 62%
        title: Downstairs Temperature
        type: state-label
      - conditions:
          - entity: binary_sensor.motion_1
            state: 'on'
        elements:
          - entity: binary_sensor.motion_1
            style:
              left: 60%
              top: 68%
            type: state-icon
        title: Downstairs Motion
        type: conditional
      - entity: switch.gate
        style:
          left: 65%
          top: 4%
        tap_action:
          action: toggle
        type: state-icon
      - double_tap_action:
          action: call-service
          service: scene.turn_on
          service_data:
            entity_id: scene.lights_out
        entity: scene.good_night_downstairs
        style:
          left: 27%
          top: 78%
        tap_action:
          action: call-service
          service: scene.turn_on
          service_data:
            entity_id: scene.good_night_downstairs
        type: state-icon
      - entity: scene.lights_out
        style:
          left: 65%
          top: 21%
        tap_action:
          action: call-service
          service: scene.turn_on
          service_data:
            entity_id: scene.lights_out
        type: state-icon
      - entity: binary_sensor.openclose_9
        style:
          left: 71%
          top: 29%
        title: Front Door
        type: state-icon
      - entity: binary_sensor.openclose_8
        style:
          left: 74%
          top: 92%
        title: Balcony
        type: state-icon
      - entity: light.switch_1_button_1
        style:
          left: 61%
          top: 34%
        tap_action:
          action: toggle
        type: state-icon
      - entity: light.switch_2_button_1
        style:
          left: 55%
          top: 56%
        tap_action:
          action: toggle
        type: state-icon
      - entity: light.switch_2_button_2
        style:
          left: 45%
          top: 45%
        tap_action:
          action: toggle
        type: state-icon
      - entity: light.switch_3_button_2
        style:
          left: 65%
          top: 75%
        tap_action:
          action: toggle
        type: state-icon
      - entity: light.switch_6_button_1
        style:
          left: 42%
          top: 17%
        tap_action:
          action: toggle
        type: state-icon
      - entity: media_player.downstairs_sonos
        style:
          left: 56%
          top: 81%
        type: state-icon
      - entity: media_player.boozel_s_room_sonos
        style:
          left: 48%
          top: 79%
        type: state-icon
    image: /local/floorplan/house_downstairs.png
    title: Downstairs
    type: picture-elements
  - elements:
      - entity: sensor.sun_brightness
        image: /local/floorplan/house_upstairs_dim.png
        state_filter:
          black: opacity(.60)
          bright: opacity(.0)
          dark: opacity(.35)
          mid: opacity(.2)
        style:
          left: 50%
          top: 50%
          width: 100%
        tap_action:
          action: none
        type: image
      - entity: light.switch_4_button_3
        hold_action: none
        state_image:
          'off': /local/floorplan/transparent_square.png
          'on': /local/floorplan/house_upstairs_backbalcony.png
        style:
          left: 50%
          top: 50%
          width: 100%
        tap_action: none
        type: image
      - entity: light.sonoff_4ch_switch_1
        hold_action: none
        state_image:
          'off': /local/floorplan/transparent_square.png
          'on': /local/floorplan/house_upstairs_backbalcony_walllight.png
        style:
          left: 50%
          top: 50%
          width: 100%
        tap_action: none
        type: image
      - entity: light.switch_4_button_1
        hold_action: none
        state_image:
          'off': /local/floorplan/transparent_square.png
          'on': /local/floorplan/house_upstairs_tvroom.png
        style:
          left: 50%
          top: 50%
          width: 100%
        tap_action: none
        type: image
      - entity: light.sonoff_3
        hold_action: none
        state_image:
          'off': /local/floorplan/transparent_square.png
          'on': /local/floorplan/house_upstairs_frontbalcony.png
        style:
          left: 50%
          top: 50%
          width: 100%
        tap_action: none
        type: image
      - entity: light.switch_5_button_2
        hold_action: none
        state_image:
          'off': /local/floorplan/transparent_square.png
          'on': /local/floorplan/house_upstairs_frontbalcony.png
        style:
          left: 50%
          top: 50%
          width: 100%
        tap_action: none
        type: image
      - entity: light.switch_4_button_2
        hold_action: none
        state_image:
          'off': /local/floorplan/transparent_square.png
          'on': /local/floorplan/house_upstairs_stairs.png
        style:
          left: 50%
          top: 50%
          width: 100%
        tap_action: none
        type: image
      - conditions:
          - entity: light.upstairs
            state: 'on'
        elements:
          - image: /local/floorplan/house_upstairs_bedroom.png
            style:
              left: 50%
              top: 50%
              width: 100%
            type: image
        type: conditional
      - conditions:
          - entity: sun.sun
            state: above_horizon
        elements:
          - entity: weather.dark_sky_hourly
            hold_action: none
            state_image:
              clear-night: /local/weather-icons/clear_night.png
              cloudy: /local/weather-icons/cloudy.png
              fog: /local/weather-icons/fog.png
              hail: /local/weather-icons/mixed_rain.png
              humidity: /local/weather-icons/humidity.png
              lightning: /local/weather-icons/lightning.png
              lightning-rainy: /local/weather-icons/storm.png
              overcast: /local/weather-icons/cloudy.png
              partlycloudy: /local/weather-icons/mostly_cloudy.png
              pouring: /local/weather-icons/heavy_rain.png
              rainy: /local/weather-icons/rainy.png
              snowy: /local/weather-icons/snowy.png
              snowy-rainy: /local/weather-icons/mixed_rain.png
              sunny: /local/weather-icons/sunny.png
              windy: /local/weather-icons/windy.png
              windy-variant: /local/weather-icons/windy.png
            style:
              left: 55%
              top: 3%
              transform: scale(0.5)
            type: image
        type: conditional
      - conditions:
          - entity: sun.sun
            state: below_horizon
        elements:
          - entity: weather.dark_sky_hourly
            hold_action: none
            state_image:
              clear-night: /local/weather-icons/clear_night.png
              cloudy: /local/weather-icons/cloudy.png
              fog: /local/weather-icons/fog.png
              hail: /local/weather-icons/mixed_rain.png
              humidity: /local/weather-icons/humidity.png
              lightning: /local/weather-icons/lightning.png
              lightning-rainy: /local/weather-icons/storm_night.png
              overcast: /local/weather-icons/cloudy.png
              partlycloudy: /local/weather-icons/mostly_cloudy_night.png
              pouring: /local/weather-icons/heavy_rain.png
              rainy: /local/weather-icons/rainy.png
              snowy: /local/weather-icons/snowy.png
              snowy-rainy: /local/weather-icons/mixed_rain.png
              sunny: /local/weather-icons/clear_night.png
              windy: /local/weather-icons/windy.png
              windy-variant: /local/weather-icons/windy.png
            style:
              left: 55%
              top: 3%
              transform: scale(0.5)
            type: image
        type: conditional
      - entity: sensor.outside_temp
        style:
          left: 65%
          top: 16%
        type: state-label
      - entity: sensor.upstairs_temperature
        style:
          left: 55%
          top: 58%
        type: state-label
      - double_tap_action:
          action: call-service
          service: scene.turn_on
          service_data:
            entity_id: scene.lights_out
        entity: scene.good_night_upstairs
        style:
          left: 27%
          top: 81%
        tap_action:
          action: call-service
          service: scene.turn_on
          service_data:
            entity_id: scene.good_night_upstairs
        type: state-icon
      - conditions:
          - entity: binary_sensor.motion_2
            state: 'on'
        elements:
          - entity: binary_sensor.motion_1
            style:
              left: 60%
              top: 45%
            type: state-icon
        type: conditional
      - entity: switch.sonoff_4ch_switch_4
        style:
          left: 37%
          top: 11%
        tap_action:
          action: toggle
        type: state-icon
      - entity: switch.sonoff_1
        style:
          left: 55%
          top: 35%
        tap_action:
          action: toggle
        type: state-icon
      - entity: switch.sonoff_2
        style:
          left: 73%
          top: 67%
        tap_action:
          action: toggle
        type: state-icon
      - entity: light.switch_4_button_1
        style:
          left: 45%
          top: 40%
        tap_action:
          action: toggle
        type: state-icon
      - entity: light.switch_4_button_2
        style:
          left: 41%
          top: 58%
        tap_action:
          action: toggle
        type: state-icon
      - entity: light.sonoff_4ch_switch_1
        style:
          left: 50%
          top: 8%
        tap_action:
          action: toggle
        type: state-icon
      - entity: light.switch_4_button_3
        style:
          left: 34%
          top: 18%
        tap_action:
          action: toggle
        type: state-icon
      - entity: light.sonoff_3
        style:
          left: 66%
          top: 83%
        tap_action:
          action: toggle
        type: state-icon
      - entity: light.switch_5_button_2
        style:
          left: 57%
          top: 83%
        tap_action:
          action: toggle
        type: state-icon
      - entity: binary_sensor.openclose_5
        style:
          left: 48%
          top: 32%
        title: Balcony
        type: state-icon
      - entity: binary_sensor.openclose_10
        style:
          left: 66%
          top: 73%
        title: Balcony
        type: state-icon
      - entity: switch.candles
        style:
          left: 36%
          top: 35%
        tap_action:
          action: toggle
        title: Balcony
        type: state-icon
      - entity: media_player.sonos_move
        style:
          left: 72%
          top: 47%
        type: state-icon
    image: /local/floorplan/house_upstairs.png
    title: Upstairs
    type: picture-elements
layout: horizontal
type: 'custom:layout-card'

Thanks for the link. It does say

Please note, though, that this is not needed for custom things, since then are always loaded.

but its worth a try

Version 0.113.0 looks like it fixed this!

I’m having this problem with the scheduler-card (a custom element) on my iPhone app (version 4.3). The card gets loaded correctly on Apple OS. I am on the most recent version of iOS and 6.3 HA.