Netatmo and switch xiaomi

hello, I would like to create an automation to put away my netatmo thermostat only when I press a xiaomi switch with the long press action. could someone help me? the thermostat also has valves already configured in home assistant but I think that to put the thermostat away, just act on the main module. thank you. help me to create atomation