mirror of
https://github.com/esphome/esphome.git
synced 2025-10-30 06:33:51 +00:00
Fix optional returns from templates
This commit is contained in:
@@ -15,7 +15,7 @@ def validate_frequency_bit_depth(obj):
|
||||
bit_depth = obj.get(CONF_BIT_DEPTH, 12)
|
||||
max_freq = APB_CLOCK_FREQ / (2**bit_depth)
|
||||
if frequency > max_freq:
|
||||
raise vol.Invalid('Maximum frequency for bit depth {} is {}'.format(bit_depth, max_freq))
|
||||
raise vol.Invalid('Maximum frequency for bit depth {} is {}Hz'.format(bit_depth, max_freq))
|
||||
return obj
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user