Hi, All:
I’m using the simple scrape integration, documented Here. What originally I thought was a scraper question, I’m embarrassed to admit, it’s now just a simple YAML question:
I have a simple (example) scraper configuration in my configuration.yaml file, as so:
# Example configuration.yaml entry
sensor:
- platform: scrape
resource: https://www.home-assistant.io
select: ".current-version h1"
name: "HA Version"
And I want to move it (and all my future scrapers) to a separate file outside my configuration.yaml, as such:
scrape: !include scrape.yaml
Naively, I assumed if I put the same YAML from above in the scrape.yaml file, it would work. Not so.
I have created scrape.yaml and in it, is the following:
# Example configuration.yaml entry
sensor:
- platform: scrape
resource: https://www.home-assistant.io
select: ".current-version h1"
name: "HA Version"
When my instance boots, I get an error stating:
2021-09-14 11:22:46 ERROR (MainThread) [homeassistant.setup] Setup failed for scrape: No setup or config entry setup function defined.
I’m pretty sure I’m just missing a space or colon or quote, but my background is not in YAML, so I am a rank newbie at the syntax.
Can anyone shed light on the proper configuration?
Thank you in advance.
-Jim