District heating systems are critical in this transition towards climate-neutral energy systems as they enable a close coupling of thermal and electric energy systems. However, the operation of these multi-modal energy systems and adequate representation of conversion dependencies, such as from heat pumps, remain challenging.To address this challenge, a novel method is presented that incorporates the temperature of subnetworks of district heating systems into the market matching of a local energy market for thermal-electric energy systems. This market-based coordination approach includes a linear formulation of market orders tailored to the needs of consumers, producers, and prosumers in local multi-modal energy systems. Emphasis is put on the temperature flexibility of heat pumps that concurrently participate in both heat and electricity markets. Complementary market commodities are introduced to account for temperature constraints set by the market participants. The physical models of the district heating network and electric distribution grid are formulated linearly and incorporated into the market-matching.The proposed method is applied in a case study representing a German district heating system. We conclude that the temperature flexibility of heating subnetworks, and dependencies involved in energy conversion can be incorporated within a linear market-matching problem.