Closed nic6911 closed 2 years ago
A change in the sensor component causes this, a change had to be made in the climate init.py of the custom component for Wavin from this:
CONFIG_SCHEMA = climate.CLIMATE_SCHEMA.extend({ cv.GenerateID(): cv.declare_id(WavinAhc9000Climate), cv.GenerateID(CONF_WAVINAHC9000_ID): cv.use_id(WavinAhc9000), cv.Required(CONF_CHANNEL): cv.int_range(min=1, max=16), cv.Optional(CONF_BATTERY_LEVEL): sensor.sensor_schema(unit_of_measurement=UNIT_PERCENT, icon=ICON_PERCENT, device_class=DEVICE_CLASS_BATTERY), cv.Optional(CONF_CURRENT_TEMP): sensor.sensor_schema(unit_of_measurement=UNIT_CELSIUS, icon=ICON_THERMOMETER, device_class=DEVICE_CLASS_TEMPERATURE), }).extend(cv.COMPONENT_SCHEMA)
To this:
CONFIG_SCHEMA = climate.CLIMATE_SCHEMA.extend({ cv.GenerateID(): cv.declare_id(WavinAhc9000Climate), cv.GenerateID(CONF_WAVINAHC9000_ID): cv.use_id(WavinAhc9000), cv.Required(CONF_CHANNEL): cv.int_range(min=1, max=16), cv.Optional(CONF_BATTERY_LEVEL): sensor.sensor_schema(UNIT_PERCENT, ICON_PERCENT, 0, DEVICE_CLASS_BATTERY), cv.Optional(CONF_CURRENT_TEMP): sensor.sensor_schema(UNIT_CELSIUS, ICON_THERMOMETER, 1, DEVICE_CLASS_TEMPERATURE, CONF_STATE_CLASS), }).extend(cv.COMPONENT_SCHEMA)
I'll mark the issue as closed, as I expect that this was an intended change to the sensor component.
The problem
Hi,
I have an external component for a floor heating system which worked just fine prior to the 2022.3.0 release of ESPHome. Now however it fails... Seems like there is an error with the Sensor component ?
Any good advice on how to get around this?
Br, Mogens
Which version of ESPHome has the issue?
2022.3.0
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
2022.3.5
What platform are you using?
ESP8266
Board
ESP-01
Component causing the issue
Sensor
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response