mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 13:34:54 +01:00
Fix BME680_BSEC compilation issue with ESP32 (#2516)
This commit is contained in:
parent
6bbb5e9b56
commit
07b309e65d
2 changed files with 23 additions and 1 deletions
|
@ -2,6 +2,7 @@ import esphome.codegen as cg
|
||||||
import esphome.config_validation as cv
|
import esphome.config_validation as cv
|
||||||
from esphome.components import i2c
|
from esphome.components import i2c
|
||||||
from esphome.const import CONF_ID
|
from esphome.const import CONF_ID
|
||||||
|
from esphome.core import CORE
|
||||||
|
|
||||||
CODEOWNERS = ["@trvrnrth"]
|
CODEOWNERS = ["@trvrnrth"]
|
||||||
DEPENDENCIES = ["i2c"]
|
DEPENDENCIES = ["i2c"]
|
||||||
|
@ -44,7 +45,8 @@ CONFIG_SCHEMA = cv.Schema(
|
||||||
cv.Optional(
|
cv.Optional(
|
||||||
CONF_STATE_SAVE_INTERVAL, default="6hours"
|
CONF_STATE_SAVE_INTERVAL, default="6hours"
|
||||||
): cv.positive_time_period_minutes,
|
): cv.positive_time_period_minutes,
|
||||||
}
|
},
|
||||||
|
cv.only_with_arduino,
|
||||||
).extend(i2c.i2c_device_schema(0x76))
|
).extend(i2c.i2c_device_schema(0x76))
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,5 +62,9 @@ async def to_code(config):
|
||||||
var.set_state_save_interval(config[CONF_STATE_SAVE_INTERVAL].total_milliseconds)
|
var.set_state_save_interval(config[CONF_STATE_SAVE_INTERVAL].total_milliseconds)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if CORE.is_esp32:
|
||||||
|
# Although this component does not use SPI, the BSEC library requires the SPI library
|
||||||
|
cg.add_library("SPI", None)
|
||||||
|
|
||||||
cg.add_define("USE_BSEC")
|
cg.add_define("USE_BSEC")
|
||||||
cg.add_library("BSEC Software Library", "1.6.1480")
|
cg.add_library("BSEC Software Library", "1.6.1480")
|
||||||
|
|
|
@ -265,6 +265,9 @@ wled:
|
||||||
|
|
||||||
adalight:
|
adalight:
|
||||||
|
|
||||||
|
bme680_bsec:
|
||||||
|
i2c_id: i2c_bus
|
||||||
|
|
||||||
esp32_ble_tracker:
|
esp32_ble_tracker:
|
||||||
|
|
||||||
ble_client:
|
ble_client:
|
||||||
|
@ -478,6 +481,19 @@ sensor:
|
||||||
duration: 150ms
|
duration: 150ms
|
||||||
update_interval: 15s
|
update_interval: 15s
|
||||||
i2c_id: i2c_bus
|
i2c_id: i2c_bus
|
||||||
|
- platform: bme680_bsec
|
||||||
|
temperature:
|
||||||
|
name: "BME680 Temperature"
|
||||||
|
pressure:
|
||||||
|
name: "BME680 Pressure"
|
||||||
|
humidity:
|
||||||
|
name: "BME680 Humidity"
|
||||||
|
iaq:
|
||||||
|
name: "BME680 IAQ"
|
||||||
|
co2_equivalent:
|
||||||
|
name: "BME680 CO2 Equivalent"
|
||||||
|
breath_voc_equivalent:
|
||||||
|
name: "BME680 Breath VOC Equivalent"
|
||||||
- platform: bmp085
|
- platform: bmp085
|
||||||
temperature:
|
temperature:
|
||||||
name: 'Outside Temperature'
|
name: 'Outside Temperature'
|
||||||
|
|
Loading…
Reference in a new issue