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

Add support for Sensirion SPS30 Particulate Matter sensors (#891)

* Add support for Sensirion SPS30 Particulate Matter sensors

* Remove blocking of the main thread on initialization;
Improve wording on the debug messages;
Add robustness in re-initialization of reconnected or replaced sensors;

* Fix code formatting;


Co-authored-by: Nad <valordk@github>
This commit is contained in:
Nad
2019-12-04 12:34:10 +01:00
committed by Otto Winter
parent 0f406c38eb
commit 7f895abc24
6 changed files with 453 additions and 0 deletions

View File

@@ -329,6 +329,13 @@ CONF_PLATFORMIO_OPTIONS = 'platformio_options'
CONF_PM_1_0 = 'pm_1_0'
CONF_PM_10_0 = 'pm_10_0'
CONF_PM_2_5 = 'pm_2_5'
CONF_PM_4_0 = 'pm_4_0'
CONF_PM_SIZE = 'pm_size'
CONF_PMC_0_5 = 'pmc_0_5'
CONF_PMC_1_0 = 'pmc_1_0'
CONF_PMC_10_0 = 'pmc_10_0'
CONF_PMC_2_5 = 'pmc_2_5'
CONF_PMC_4_0 = 'pmc_4_0'
CONF_PORT = 'port'
CONF_POSITION = 'position'
CONF_POSITION_ACTION = 'position_action'
@@ -503,6 +510,7 @@ ICON_BRIEFCASE_DOWNLOAD = 'mdi:briefcase-download'
ICON_BRIGHTNESS_5 = 'mdi:brightness-5'
ICON_CHECK_CIRCLE_OUTLINE = 'mdi:check-circle-outline'
ICON_CHEMICAL_WEAPON = 'mdi:chemical-weapon'
ICON_COUNTER = 'mdi:counter'
ICON_CURRENT_AC = 'mdi:current-ac'
ICON_EMPTY = ''
ICON_FLASH = 'mdi:flash'
@@ -519,6 +527,7 @@ ICON_PULSE = 'mdi:pulse'
ICON_RADIATOR = 'mdi:radiator'
ICON_RESTART = 'mdi:restart'
ICON_ROTATE_RIGHT = 'mdi:rotate-right'
ICON_RULER = 'mdi:ruler'
ICON_SCALE = 'mdi:scale'
ICON_SCREEN_ROTATION = 'mdi:screen-rotation'
ICON_SIGN_DIRECTION = 'mdi:sign-direction'
@@ -535,6 +544,7 @@ ICON_WIFI = 'mdi:wifi'
UNIT_AMPERE = 'A'
UNIT_CELSIUS = u'°C'
UNIT_COUNTS_PER_CUBIC_METER = u'#/m³'
UNIT_DECIBEL = 'dB'
UNIT_DECIBEL_MILLIWATT = 'dBm'
UNIT_DEGREE_PER_SECOND = u'°/s'
@@ -550,6 +560,7 @@ UNIT_LUX = 'lx'
UNIT_METER = 'm'
UNIT_METER_PER_SECOND_SQUARED = u'm/s²'
UNIT_MICROGRAMS_PER_CUBIC_METER = u'µg/m³'
UNIT_MICROMETER = 'µm'
UNIT_MICROSIEMENS_PER_CENTIMETER = u'µS/cm'
UNIT_MICROTESLA = u'µT'
UNIT_OHM = u'Ω'