Skip to content

Multiscrape Entities Not Created When Product Data is Missing #466

@jlipsit

Description

@jlipsit

Hoping someone can help. I posted on other sites but did not get any advice.

I’m using the multiscrape integration in Home Assistant to scrape product data from SmartLabel website, based on a UPC stored in the sensor.esphome_web_e0bdc0_barcode_scanner_data sensor. The problem arises when I restart Home assistant: If the previous UPC in the sensor points to a valid page, but the product data isn’t found (e.g., the expected elements don’t exist on the page) then the multiscrape entities (e.g., sensor.smartlabel_product_title, sensor.smartlabel_product_image) are not created.

This becomes a major issue after restarting Home Assistant, as the entities remain "unknown" or completely missing, which breaks further scanning and related automations.

Goal:
I want to ensure the multiscrape entities are always created at startup, even if the scraped data is missing or unavailable. Ideally, these entities should initialize with a default state (e.g., "Product Not Found"). If this isn’t officially supported, I’m looking for a reliable workaround to achieve this.

multiscrape:

  • resource_template: "https://smartlabel.syndigo.com/upc/{{ states('sensor.esphome_web_e0bdc0_barcode_scanner_data') | default('041415033658') }}"
    scan_interval: 86400
    sensor:
    • name: "SmartLabel Product Title"
      unique_id: "smartlabel_product_title"
      select: "title"
    • name: "SmartLabel Product Image"
      unique_id: "smartlabel_product_image"
      select: "img.top__image"
      attribute: "src"
    • name: "SmartLabel Supermarket Name"
      unique_id: "smartlabel_supermarket_name"
      select: "div.medium-medium"

If not, what’s the best workaround to address this? I can help pay if this functionality can be added to multiscrape. It would be very useful for others as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions