HA Multiscrape - getting value

Dear all,

I’m playing for the first time with HA Multiscrape. I saw some tutorials however my script doesn’t work.

I would like to get a price from this table e.g. Nurnberg : Bergmüller Energie & Service GmbH Erlangen - Aktuelle Tagespreise

so then i created my code as following:

- resource : https://bergmueller-gmbh.de/tagespreise.html
  scan_interval: 28800
  sensor:
     - unique_id: OilPrice_Nurnberg
       name: OilPrice
       select: ".cs_curr_price_table > tbody:nth-child(1) > tr:nth-child(26) > td:nth-child(3)"
       unit_of_measurement: "€"
       value_template: '{{ value_json [state] }}'

but is not working. May I ask a little support to understand where I’m making mistakes?
Thank you so much!

Remove the tbody:nth-child(1) > from your selector. I’m also not sure what you try to do in the value_template. Try to start without that one as well.

1 Like

After some study now at least I’m able to get a value and show it in a dashboard E.g. 180€. The strange thing is that for HA this is not a number therefore I cannot show it in a graph statistic picture. This is my code:

scan_interval: 3600
  sensor:
     - unique_id: OilPrice_Nurnberg
       name: OilPrice
       select: "div.g-col-md-3:nth-child(1) > div:nth-child(2)"
       value_template: "{{value}}"
       

It’s not a number because it contains the euro sign. You need to split it with a value_template like this (untested):
{{ value.split("€")[0]}}