Multiscrape -> Oemag.at

Hello,

is it possible to get this scraped?
I tried it but…

https://www.oem-ag.at/de/home/
image

1 Like

so hab ichs:

command_line:
  - sensor:
      name: oemag_marktpreis
      command: echo $(curl https://www.oem-ag.at/de/marktpreis/ | grep -Po "<strong>([\d,]+) ct/kWh<\/strong>" | grep -Po "[0-9,]{3,7}" | sed 's/,/./g') 
      #https://www.libe.net/oemag
      unit_of_measurement: 'ct/kWh'
      scan_interval: 21600
      icon: mdi:cash
2 Likes

I ended up with this, just if someone prefers multiscrape:

multiscrape:
  - name: HA scraper for e-control
    resource: https://www.e-control.at/de/marktteilnehmer/oeko-energie/marktpreis
    scan_interval: 86400
    sensor:
      - unique_id: energie_marktpreis
        name: Energie Marktpreis
        unit_of_measurement: EUR/kWh
        select: ".journal-content-article > table:nth-child(9) > tbody:nth-child(1) > tr:nth-child(8) > td:nth-child(2)"
        value_template: '{{ value | replace (",", "") | float(default=0.0) | int / 100000 | round(2) }}'
  - name: HA scraper for oem-ag
    resource: https://www.oem-ag.at/de/marktpreis/
    scan_interval: 21600
    sensor:
      - unique_id: oemag_marktpreis
        name: OeMAG Marktpreis
        unit_of_measurement: EUR/kWh
        select: "#c1048 > table > tbody:nth-child(1) > tr:nth-last-child(1) > td:nth-child(2) > strong"
        value_template: '{{ value | select("in",",.0123456789") | join | replace(",",".") | float(0) / 100 }}'