AirThings BLE 传感器
airthings_wave_plus 和 airthings_wave_mini 传感器平台可让您追踪 AirThings 蓝牙低功耗设备的输出。
此组件将追踪氡气、空气化学物质、CO2、温度和湿度等其他指标,具体取决于设备传感器。
可以使用 airthings_ble 蓝牙扫描仪找到 AirThings 设备。
要了解您设备的 MAC 地址,请在 ESPHome 配置中添加以下内容:
logger: level: DEBUG # Required for the tracker to show the device
esp32_ble_tracker:airthings_ble:然后设备将监听附近的设备,并显示如下消息:
[D][airthings_ble:019]:Found AirThings device Serial: 123456789 (MAC: XX:XX:XX:XX:XX:XX)找到设备后,从配置中删除 airthings_ble 设备追踪器,并记下设备 MAC 地址,在下文配置传感器时使用它。
Airthings Wave Plus 传感器
Section titled “Airthings Wave Plus 传感器”AirThings Wave Plus 可追踪氡气(24 小时和长期)、空气化学物质、CO2、温度、大气压和湿度。
sensor: - platform: airthings_wave_plus name: wave_plus ble_client_id: airthings01 update_interval: 5min # default battery_update_interval: 24h # default temperature: name: "WavePlus Temperature" radon: name: "WavePlus Radon" radon_long_term: name: "WavePlus Radon Long Term" pressure: name: "WavePlus Pressure" humidity: name: "WavePlus Humidity" co2: name: "WavePlus CO2" tvoc: name: "WavePlus VOC" illuminance: name: "WavePlus ambient light" battery_voltage: name: "WavePlus Battery Voltage"
ble_client: - mac_address: XX:XX:XX:XX:XX:XX id: airthings01
esp32_ble_tracker:Airthings Wave Mini 传感器
Section titled “Airthings Wave Mini 传感器”AirThings Wave Mini 可追踪空气化学物质、温度、压力和湿度。
配置示例:
sensor: - platform: airthings_wave_mini ble_client_id: airthingsmini update_interval: 5min # default battery_update_interval: 24h # default temperature: name: "WaveMini Temperature" pressure: name: "WaveMini Pressure" humidity: name: "WaveMini Humidity" tvoc: name: "WaveMini VOC" battery_voltage: name: "WaveMini Battery Voltage"
ble_client: - mac_address: XX:XX:XX:XX:XX:XX id: airthingsmini
esp32_ble_tracker:NOTE
传感器根据设备报告的内部刷新超时时间,每 5 分钟对设备进行主动轮询。
NOTE
电池电压报告的默认频率为每 24 小时一次,以
减少 BLE 流量(获取电池电压需要相当
多的 BLE 命令/响应);如果您希望更频繁地
报告,请配置 battery_update_interval。主
传感器 update_interval 控制整体轮询频率,
因此将电池电压的间隔设置为较低值
将导致每个轮询间隔报告一次电池电压。
Airthings Wave Radon (Gen 2) 传感器
Section titled “Airthings Wave Radon (Gen 2) 传感器”AirThings Wave Radon (Gen 2) 可追踪氡气(24 小时和长期)、温度、大气压和湿度。
NOTE
Wave Gen2 设备不支持 CO2 或 TVOC 传感器——仅提供氡气、温度、压力、湿度和环境光。
-
device_type (可选): 指定 AirThings Wave 设备的类型。默认为
WAVE_PLUS。WAVE_PLUS: 用于 AirThings Wave Plus 设备(支持包括 CO2 和 TVOC 在内的所有传感器)WAVE_GEN2: 用于 AirThings Wave Radon Gen 2 设备(不支持 CO2 或 TVOC 传感器)
sensor: - platform: airthings_wave_plus name: wave_gen2 ble_client_id: airthings01 device_type: WAVE_GEN2 # Required for Wave Gen2 devices (default is WAVE_PLUS) update_interval: 5min # default battery_update_interval: 24h # default temperature: name: "WaveG2 Temperature" radon: name: "WaveG2 Radon" radon_long_term: name: "WaveG2 Radon Long Term" pressure: name: "WaveG2 Pressure" humidity: name: "WaveG2 Humidity" illuminance: name: "WaveG2 ambient light" battery_voltage: name: "WaveG2 Battery Voltage"
ble_client: - mac_address: XX:XX:XX:XX:XX:XX id: airthings01
esp32_ble_tracker:电池电量报告
Section titled “电池电量报告”如果您希望将”电池剩余寿命百分比” 作为传感器报告,可以使用 复制传感器 组件。
以下示例基于标准碱性电池; 如果您使用其他类型的电池,可能需要调整 参考电压以获得正确的 0-100% 量程。电压 参考值的选择旨在与 AirThings 移动应用 中显示的 0-100% 范围尽可能接近。
sensor: - platform: airthings_wave_mini ble_client_id: airthingsmini battery_voltage: id: bv name: "WaveMini Battery Voltage" - platform: copy source_id: bv name: "WaveMini Battery Level" unit_of_measurement: "%" device_class: battery accuracy_decimals: 0 filters: - calibrate_linear: - 2.7 -> 0 - 4.5 -> 100sensor: - platform: airthings_wave_plus ble_client_id: airthings01 battery_voltage: id: bv name: "WavePlus Battery Voltage" - platform: copy source_id: bv name: "WavePlus Battery Level" unit_of_measurement: "%" device_class: battery accuracy_decimals: 0 filters: - calibrate_linear: - 2.2 -> 0 - 3.1 -> 100