Add Blebox air quality support (#35372)

* support BleBox air-quality

* fixed switch tests via cherry-pick from #35552

* fix test after cherry-picking

* fix flake8 issues
This commit is contained in:
gadgetmobile authored and GitHub committed 2020-05-16 10:51:37 -05:00
1 parent 73616520c0
commit 6e0359efa6
6 files changed
+142 -20

No files matched your search

+2 -4
View File
@@ -3,15 +3,13 @@
from homeassistant.helpers.entity import Entity
from . import BleBoxEntity, create_blebox_entities
from .const import BLEBOX_TO_HASS_DEVICE_CLASSES, BLEBOX_TO_UNIT_MAP, DOMAIN, PRODUCT
from .const import BLEBOX_TO_HASS_DEVICE_CLASSES, BLEBOX_TO_UNIT_MAP
async def async_setup_entry(hass, config_entry, async_add):
"""Set up a BleBox entry."""
product = hass.data[DOMAIN][config_entry.entry_id][PRODUCT]
create_blebox_entities(product, async_add, BleBoxSensorEntity, "sensors")
return True
create_blebox_entities(hass, config_entry, async_add, BleBoxSensorEntity, "sensors")
class BleBoxSensorEntity(BleBoxEntity, Entity):