Pyscript: How to trigger a script on change of a climate entity?

I am using pyscript with @state_trigger.

This works perfectly fine for “simple” entities like numbers.

But how can I use @state_trigger with a climate entity?

I tried this:

@state_trigger("climate.panasonic_heat_pump_main_z1_temp_2")
def state_trig_func(**kwargs):
    log.info(f"state_trig_func called with climate entity: kwargs={kwargs}")

# and this:

@state_trigger("climate.panasonic_heat_pump_main_z1_temp_2.current_temperature")
def state_trig_func(**kwargs):
    log.info(f"state_trig_func called with current temperature: kwargs={kwargs}")

But my script is never been called, although the main state of the entity (heat / off) and the current_temperature changed.

I am using HA 2025.9.1 and pyscript 1.6.4

Please help!
Thx, Klaus

I just realised that probably I would have to react on the service call changing the temperature, not on the change of the attribute