Minimum/Maximum values for time period

Hello, after searching and trying for over a week now I have to admit my brain is made for repairing cars and not programming my own smart home.

As far as I can use HACS and standard integrations I am fine.
I got my small 600W Solar converter and two shellys (one EM3 and one EM) and its lovely to watch in die lovelace UI.

I am trying to have my maximum solar shown in the UI, so I will have to make a sensor, correct?

My Sensor is “sensor.shellyem_05b268_channel_1_power” and when the sun is shining I have about -400 Watts of energy, because it gets back in the house.
So do I need to determine the minimum, because it is below zero? Or the maximum?
And can I easily copy the sensor but make it positive by “removing” the “-”
I tried to to this with the “Helper” Integration:


But there the value is just updated very time and does not “hold” the maximum value.
And how can I achieve that the value is reset every day at midnight?
I would like to have a Maximum of the Day, of 7 Days and 30 Days.

Here are many good ideas, I look at the Min/Max, which is included in the helper and the " Statistics" but nevertheless I could get a daily high or low in this case. " History Stats" would not work because it is no “how long” question.

Thank you very much.

At night it hit me, making a negative value positive is easy. Just multiply it with “-1”.
This part is working now, but the statistic thing does not really want to work.

- name: "Solar_Power_pos"
        unit_of_measurement: "W"
        state: "{{ states('sensor.shellyem_05b268_channel_1_power')|float * -1 }}"
        device_class: energy