Automation to increase hot water temperature when access solar power is available

Hi there,

I’m trying to create an automation like something along the lines of:

while ((battery_charge > 95%) && (forecast == sunny) && (sensor.domestic_hot_water_setpoint == sensor.domestic_hot_water_cuttent_temperture) && (sensor.domestic_hot_water_setpoint < 65°C)) {
  sensor.domestic_hot_water_setpoint += 5°C;
}

So while the forecast is sunny, the battery is full, and the tank temperature is still below 65°C, continue warming up that water.

How do I in practice use an automation to set the value of a sensor?

Any other things I should look out for?

Thanks!

You can’t change the value of sensors manually. Sensors are not user update-able.

You can change the value of a climate device set point. You can also change the value of number entities.

Is this really a sensor?