Clone existing sensor and query with a delay

Hello,

I have a sensor that polls my PV system every second. It has to stay that way, as a 30-second query at the end of the day, for example, had too much difference in it.

Now I want to display the value as a widget on my Android cell phone. This also works. Only the second-by-second display is annoying here.
So I cloned the PV yield sensor and added a scan interval. But the magHA doesn’t work. If I remove the line, it works again. But then it displays every second again. Does anyone know what to do?

      - name: "PV Erzeugung 30s (gerundet)"
        unique_id: pv_erzeugung_30s_gerundet
        state: >
          {{ states('sensor.pv_erzeugung') | float | int }}
        unit_of_measurement: "{{ state_attr('sensor.pv_erzeugung', 'unit_of_measurement') }}"
        availability: >
          {{ states('sensor.pv_erzeugung') not in ['unknown', 'unavailable'] }}
        icon: mdi:solar-power
        scan_interval: 30

Use a triggered template sensor with a 30 second time pattern trigger.

ah… THAT was easy.

I searched for trigger and found it straight away.
Very simple… very nice. I was able to implement it successfully. I had forgotten the 30 seconds and was already annoyed that there were no sensor values. But then they were there and now update appropriately. THANKS