Fixes webhook schema for different temp and volume units (#130578)

This commit is contained in:
Johan Nenzén
2024-11-15 09:46:12 +01:00
committed by GitHub
parent 6ee85e9094
commit b3fcc0cf60

View File

@@ -64,10 +64,10 @@ WEBHOOK_SCHEMA = vol.Schema(
vol.Required(ATTR_DEVICE_NAME): cv.string,
vol.Required(ATTR_DEVICE_ID): cv.positive_int,
vol.Required(ATTR_TEMP_UNIT): vol.In(
UnitOfTemperature.CELSIUS, UnitOfTemperature.FAHRENHEIT
[UnitOfTemperature.CELSIUS, UnitOfTemperature.FAHRENHEIT]
),
vol.Required(ATTR_VOLUME_UNIT): vol.In(
UnitOfVolume.LITERS, UnitOfVolume.GALLONS
[UnitOfVolume.LITERS, UnitOfVolume.GALLONS]
),
vol.Required(ATTR_BPM): cv.positive_int,
vol.Required(ATTR_TEMP): vol.Coerce(float),