mirror of
https://github.com/esphome/esphome.git
synced 2025-07-28 22:26:36 +00:00
[config] Add bitrate validator (#9423)
This commit is contained in:
parent
7d92499e4c
commit
16bb81814c
@ -1055,6 +1055,7 @@ def float_with_unit(quantity, regex_suffix, optional_unit=False):
|
||||
return validator
|
||||
|
||||
|
||||
bps = float_with_unit("bits per second", "(bps|bits/s|bit/s)?")
|
||||
frequency = float_with_unit("frequency", "(Hz|HZ|hz)?")
|
||||
resistance = float_with_unit("resistance", "(Ω|Ω|ohm|Ohm|OHM)?")
|
||||
current = float_with_unit("current", "(a|A|amp|Amp|amps|Amps|ampere|Ampere)?")
|
||||
|
Loading…
x
Reference in New Issue
Block a user