mirror of
https://github.com/esphome/esphome.git
synced 2024-11-26 00:48:19 +01:00
Update_interval less that 1 second in QMC5883L integration (#4031)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
parent
cb2d9e4bec
commit
2f62426f09
1 changed files with 1 additions and 1 deletions
|
@ -103,7 +103,7 @@ CONFIG_SCHEMA = (
|
||||||
|
|
||||||
|
|
||||||
def auto_data_rate(config):
|
def auto_data_rate(config):
|
||||||
interval_sec = config[CONF_UPDATE_INTERVAL].seconds
|
interval_sec = config[CONF_UPDATE_INTERVAL].total_milliseconds / 1000
|
||||||
interval_hz = 1.0 / interval_sec
|
interval_hz = 1.0 / interval_sec
|
||||||
for datarate in sorted(QMC5883LDatarates.keys()):
|
for datarate in sorted(QMC5883LDatarates.keys()):
|
||||||
if float(datarate) >= interval_hz:
|
if float(datarate) >= interval_hz:
|
||||||
|
|
Loading…
Reference in a new issue