package Ġde . lar sk ol met z . sm arth ome manager . web . controller Ċ Ċ import Ġde . lar sk ol met z . sm arth ome manager . core . domain . He ating Data Ċ import Ġde . lar sk ol met z . sm arth ome manager . core .` in `. He ating Service Ċ import Ġorg . springframework . http . HttpStatus Ċ import Ġorg . springframework . http . Response Entity Ċ import Ġorg . springframework . web . bind . annotation . GetMapping Ċ import Ġorg . springframework . web . bind . annotation . ResponseBody Ċ import Ġorg . springframework . web . bind . annotation . RestController Ċ Ċ @ RestController Ċ class ĠHe ating Controller ( private Ġval Ġhe ating Service : ĠHe ating Service ) Ġ{ ĊĊĠĠĠ Ġ@ GetMapping ("/ he ating / target temperature val ve ") ĊĠĠĠ Ġ@ ResponseBody ĊĠĠĠ Ġfun Ġget Target Temperature (): ĠResponseEntity < He ating Data > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġdata Ġ= Ġhe ating Service . getTarget Temperature And Val ve () ĊĠĠĠĠĠĠĠ Ġreturn Ġif Ġ( data . target Temperature Ġ!= Ġnull Ġ|| Ġdata . val ve Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠResponseEntity ( data , ĠHttpStatus . OK ) ĊĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠResponseEntity ( HttpStatus . INTERNAL _ SERVER _ ERROR ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ Ċ }