Trying to get the scrape sensor to work for picking up the spot gold price and %-change using the id-tag. Can someone please help with the code.
- platform: scrape
resource: https://goldprice.org/spot-gold.html
select: "#gpxtickerLeft_price,#gpxtickerLeft_price_chg_pc"
value_template: '{{ value.split(",") If gpxtickerLeft_price_chg < 0 then "Down" else "Up"}}'
attribute:
price: gpxtickerLeft_price
change: gpxtickerLeft_price_chg_p
name: Spot Gold