Since Core_2022.12.9 my rest sensor doesn’t load any more. I can’t seem to find any info anywhere on this.
here is the yaml
- platform: rest
name: stefans_env_rest
unique_id: stefans_foobar
params:
sessionkey: "{'key':'a083-8496-e232-c9ec'}"
sts: "{'temperature':1,'humidity':1, 'ccs811':1}"
json_attributes:
- temperature
- humidity
- co2
- tvoc
resource: http://stefan-47130.local/json
- platform: template
sensors:
stefans_temperature:
friendly_name: " Stefan's Temperature"
value_template: "{{ state_attr('sensor.stefans_env','temperature')}}"
unit_of_measurement: "°C"
unique_id: sstefan_temperature
stefans_humidity:
friendly_name: "Stefan's humiditiy"
value_template: "{{ state_attr('sensor.stefans_env','humidity')}}"
unit_of_measurement: "%"
and here is the log entry for it
Logger: homeassistant.components.sensor
Source: components/rest/data.py:63
Integration: Sensor (documentation, issues)
First occurred: 07:18:58 (1 occurrences)
Last logged: 07:18:58
Error while setting up rest platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 289, in _async_setup_platform
await asyncio.shield(task)
File "/usr/src/homeassistant/homeassistant/components/rest/sensor.py", line 63, in async_setup_platform
await rest.async_update(log_errors=False)
File "/usr/src/homeassistant/homeassistant/components/rest/data.py", line 63, in async_update
response = await self._async_client.request(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1520, in request
request = self.build_request(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 351, in build_request
params = self._merge_queryparams(params)
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 428, in _merge_queryparams
return merged_queryparams.merge(params)
File "/usr/local/lib/python3.10/site-packages/httpx/_urls.py", line 723, in merge
q = QueryParams(params)
File "/usr/local/lib/python3.10/site-packages/httpx/_urls.py", line 585, in __init__
self._dict = {
File "/usr/local/lib/python3.10/site-packages/httpx/_urls.py", line 586, in <dictcomp>
str(k): [primitive_value_to_str(item) for item in v]
File "/usr/local/lib/python3.10/site-packages/httpx/_urls.py", line 586, in <listcomp>
str(k): [primitive_value_to_str(item) for item in v]
File "/usr/local/lib/python3.10/site-packages/httpx/_utils.py", line 72, in primitive_value_to_str
raise TypeError(
TypeError: Expected str, int, float, bool, or None. Got 'Wrapper'.
as you can see from the log entry it is receiving a wrapper. Nothing has changed on the sensor and I can still access it via it’s API without issue. I have updated since to see if it corrects the issue, am now running core_2023.1.1 any pointers would be greatly appreciated.