1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 03:12:20 +01:00

Add QMC5883L Sensor + Improvements to HMC5883L (#671)

* Add QMC5883L and Updated HMC5883L

* add tests

* changed to oversampling

* fix pylint

* fix private method

* typo fix

* fix protected method

* Clean up code and PR recomendations

* fix tests

* remote file

* fix qmc oversampling unit

* Remove hmc5883l config logging

Either the units are converted to the user values like 1x, 8x oversampling or not printed at all. Printing the machine-value of these is only confusing users.

* Changes for validate_enum

Move stuff that can be done beforehand out of the bound function, use text_type for py2/3 compatability.

* Remove unused constant

* Remove duplicate tests

* Repeat remove config print

* remove changes to test2 since bin is to large

* Add comment to HMC5583L


Co-authored-by: Timothy Purchas <timothy@TPF.local>
Co-authored-by: Otto Winter <otto@otto-winter.com>
This commit is contained in:
Tim P
2019-11-27 04:43:11 +11:00
committed by Otto Winter
parent 36ffef083b
commit fa1adfd934
8 changed files with 378 additions and 15 deletions

View File

@@ -417,6 +417,20 @@ sensor:
heading:
name: "HMC5883L Heading"
range: 130uT
oversampling: 8x
update_interval: 15s
- platform: qmc5883l
address: 0x0D
field_strength_x:
name: "QMC5883L Field Strength X"
field_strength_y:
name: "QMC5883L Field Strength Y"
field_strength_z:
name: "QMC5883L Field Strength Z"
heading:
name: "QMC5883L Heading"
range: 800uT
oversampling: 256x
update_interval: 15s
- platform: hx711
name: "HX711 Value"