Restful Sensor shows unknown for Fronius API

Hello,

I have some trouble with this sensor:

- platform: rest
  name: Temperatur String
  unique_id: temperatur_string_rest
  resource_template: http://xxx.xxx.xxx.xxx/solar_api/v1/GetArchiveData.cgi?Scope=System&StartDate={{ now().strftime('%d.%m.%Y') }}&EndDate={{ now().strftime('%d.%m.%Y') }}&Channel=Temperature_Powerstage
  force_update: true
  state_class: measurement
  scan_interval: 300
  timeout: 30
  value_template: >-
    {% set value_json_data = value_json.Body.Data["inverter/1"].Data.Temperature_Powerstage["Values"] %}
    {% set _last = value_json_data.keys() | list | map('float') | max | string %}
    {{ value_json_data[_last] | float(0) }}
  unit_of_measurement: °C

I’ve checked everything several times, but unfortunately I can’t find anything anymore. Am I missing something?

Here is the raw data from the api

{
	"Body" : 
	{
		"Data" : 
		{
			"inverter/1" : 
			{
				"Data" : 
				{
					"Temperature_Powerstage" : 
					{
						"Unit" : "°C",
						"Values" : 
						{
							"0" : 0,
							"10200" : 0,
							"10500" : 0,
							"10800" : 0,
							"11100" : 0,
							"11400" : 0,
							"11700" : 0,
							"1200" : 0,
							"12000" : 0,
							"12300" : 0,
							"12600" : 0,
							"12900" : 0,
							"13200" : 0,
							"13500" : 0,
							"13800" : 0,
							"14100" : 0,
							"14400" : 0,
							"14700" : 0,
							"1500" : 0,
							"15000" : 0,
							"15300" : 0,
							"15600" : 0,
							"15900" : 0,
							"16200" : 0,
							"16500" : 0,
							"16800" : 0,
							"17100" : 0,
							"17400" : 0,
							"17700" : 0,
							"1800" : 0,
							"18000" : 0,
							"18300" : 0,
							"18600" : 0,
							"18900" : 0,
							"19200" : 0,
							"19500" : 0,
							"19800" : 0,
							"20100" : 0,
							"20400" : 0,
							"20700" : 0,
							"2100" : 0,
							"21000" : 0,
							"21300" : 0,
							"21600" : 0,
							"21900" : 0,
							"22200" : 0,
							"22500" : 0,
							"22800" : 0,
							"23100" : 0,
							"23400" : 0,
							"23700" : 0,
							"2400" : 0,
							"24000" : 0,
							"24300" : 0,
							"24600" : 0,
							"24900" : 0,
							"25200" : 0,
							"25500" : 0,
							"25800" : 0,
							"26100" : 0,
							"26400" : 0,
							"26700" : 0,
							"2700" : 0,
							"27000" : 0,
							"27300" : 0,
							"27600" : 0,
							"27900" : 0,
							"28200" : 0,
							"28500" : 0,
							"28800" : 0,
							"29100" : 24,
							"29400" : 25,
							"29700" : 26,
							"300" : 0,
							"3000" : 0,
							"30000" : 26,
							"30300" : 27,
							"30600" : 27,
							"30900" : 28,
							"31200" : 28,
							"31500" : 29,
							"31800" : 29,
							"32100" : 29,
							"32400" : 30,
							"32700" : 30,
							"3300" : 0,
							"33000" : 30,
							"33300" : 31,
							"33600" : 31,
							"33900" : 31,
							"34200" : 31,
							"34500" : 32,
							"34800" : 32,
							"35100" : 32,
							"35400" : 33,
							"35700" : 33,
							"3600" : 0,
							"36000" : 34,
							"36300" : 34,
							"36600" : 34,
							"36900" : 35,
							"37200" : 35,
							"37500" : 35,
							"37800" : 36,
							"38100" : 36,
							"38400" : 36,
							"38700" : 37,
							"3900" : 0,
							"39000" : 38,
							"39300" : 37,
							"39600" : 37,
							"39900" : 38,
							"40200" : 39,
							"40500" : 39,
							"40800" : 40,
							"41100" : 40,
							"41400" : 40,
							"41700" : 40,
							"4200" : 0,
							"42000" : 40,
							"42300" : 40,
							"42600" : 40,
							"42900" : 40,
							"43200" : 40,
							"43500" : 40,
							"43800" : 40,
							"44100" : 40,
							"44400" : 40,
							"44700" : 40,
							"4500" : 0,
							"45000" : 40,
							"45300" : 40,
							"45600" : 40,
							"45900" : 40,
							"46200" : 40,
							"46500" : 39,
							"46800" : 39,
							"47100" : 39,
							"47400" : 40,
							"47700" : 40,
							"4800" : 0,
							"48000" : 40,
							"48300" : 40,
							"48600" : 40,
							"48900" : 40,
							"49200" : 40,
							"49500" : 39,
							"49800" : 39,
							"50100" : 39,
							"50400" : 39,
							"50700" : 39,
							"5100" : 0,
							"51000" : 39,
							"51300" : 39,
							"51600" : 39,
							"51900" : 39,
							"52200" : 39,
							"52500" : 39,
							"52800" : 39,
							"53100" : 40,
							"53400" : 40,
							"53700" : 40,
							"5400" : 0,
							"54000" : 39,
							"54300" : 39,
							"54600" : 39,
							"54900" : 39,
							"55200" : 39,
							"55500" : 39,
							"55800" : 39,
							"56100" : 39,
							"56400" : 38,
							"56700" : 38,
							"5700" : 0,
							"57000" : 38,
							"57300" : 38,
							"57600" : 38,
							"57900" : 38,
							"58200" : 38,
							"58500" : 0,
							"58800" : 0,
							"59100" : 0,
							"59400" : 0,
							"59700" : 0,
							"600" : 0,
							"6000" : 0,
							"60000" : 0,
							"6300" : 0,
							"6600" : 0,
							"6900" : 0,
							"7200" : 0,
							"7500" : 0,
							"7800" : 0,
							"8100" : 0,
							"8400" : 0,
							"8700" : 0,
							"900" : 0,
							"9000" : 0,
							"9300" : 0,
							"9600" : 0,
							"9900" : 0
						},
						"_comment" : "channelId=65795"
					}
				},
				"DeviceType" : 111,
				"End" : "2023-11-20T23:59:59+01:00",
				"NodeType" : 97,
				"Start" : "2023-11-20T00:00:00+01:00"
			}
		}
	},
	"Head" : 
	{
		"RequestArguments" : 
		{
			"Channel" : 
			[
				"Temperature_Powerstage"
			],
			"EndDate" : "2023-11-20T23:59:59+01:00",
			"HumanReadable" : "True",
			"Scope" : "System",
			"SeriesType" : "Detail",
			"StartDate" : "2023-11-20T00:00:00+01:00"
		},
		"Status" : 
		{
			"Code" : 0,
			"ErrorDetail" : 
			{
				"Nodes" : []
			},
			"Reason" : "",
			"UserMessage" : ""
		},
		"Timestamp" : "2023-11-20T16:41:29+01:00"
	}
}

The error was in the typing. Instead of map('float') must be set to map('int')