Wrong represented string-value?

yaml:

- resource: https://www.goldpreis.de
  sensor:
    - name: "Goldpreis_yaml"
      select: ".au_gold_eur_o"
      unit_of_measurement: "€/oz"
      unique_id: goldpreis_yaml

That’s what the homeassistant.log delievers:

2024-12-08 11:01:03.474 ERROR (MainThread) [homeassistant.components.sensor] Error adding entity sensor.goldpreis for domain sensor with platform scrape
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 677, in state
    numerical_value = float(value)  # type:ignore[arg-type]
ValueError: could not convert string to float: '2.492,05'

My place is in germany, though of course it is the right formatting.

What to do?
I need some help.

Many thanks in advance.

So long
Pc

The backend of home assitant requires that the number be in this format:
2492.05, which you can do like this:

- resource: https://www.goldpreis.de
  sensor:
    - name: "Goldpreis_yaml"
      select: ".au_gold_eur_o"
      value_template: "{{ value|replace('.','')|replace(',','.') }}"
      unit_of_measurement: "€/oz"
      unique_id: goldpreis_yaml

It will still be displayed in your local format by the frontend.

many thanks, Tom !

BUT: I then wonder why the system settings regarding currency, date, etc. are ignored here.
Do the right thing wrong, and achieve the right thing… WTH

The backend always uses UTC time and a period for the decimal point.

Those settings are for how things are displayed in the frontend (dashboard).

Thanks, Tom.
U R welcome…

So long
Pc