1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-24 20:53:48 +01:00

Implement sensor component for MMC5983 (#5361)

This commit is contained in:
Adam Goode
2023-10-08 17:26:58 -04:00
committed by GitHub
parent aba3cd557a
commit af62c2d9cf
10 changed files with 249 additions and 9 deletions

View File

@@ -3,6 +3,9 @@ import esphome.config_validation as cv
from esphome.components import i2c, sensor
from esphome.const import (
CONF_ADDRESS,
CONF_FIELD_STRENGTH_X,
CONF_FIELD_STRENGTH_Y,
CONF_FIELD_STRENGTH_Z,
CONF_ID,
CONF_OVERSAMPLING,
CONF_RANGE,
@@ -18,9 +21,6 @@ DEPENDENCIES = ["i2c"]
hmc5883l_ns = cg.esphome_ns.namespace("hmc5883l")
CONF_FIELD_STRENGTH_X = "field_strength_x"
CONF_FIELD_STRENGTH_Y = "field_strength_y"
CONF_FIELD_STRENGTH_Z = "field_strength_z"
CONF_HEADING = "heading"
HMC5883LComponent = hmc5883l_ns.class_(