Thermostat max_temp from topic

Hi,

I have a ZigBee TuYa X5H-GB-B thermostat that exposes max_temp as upper_temp. Home Assistant device state, min_temp and max_temp are set with constant values, so, how can I set max_temp with upper_temp attribute?

Scratching the surface, I need to set:

max_temp_template: '{{ value_json.upper_temp }}'
max_temp_topic: zigbee2mqtt/Termostato // friendly_name of device?

But:
Is an issue on Zigbee2Mqtt that not set the correct attribute?
Has Home Assistant support to automatically assign the max_temp with zigbee devices?
Can I tweak Home Assistant to do this?

Thanks in advanceā€¦