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

pull/130670/head
Johan Nenzén 2024-11-15 09:46:12 +01:00 committed by GitHub
parent 6ee85e9094
commit b3fcc0cf60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

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),