diff --git a/platypush/plugins/sensor/bme280/__init__.py b/platypush/plugins/sensor/bme280/__init__.py index f33c971843..4d0ea55ae4 100644 --- a/platypush/plugins/sensor/bme280/__init__.py +++ b/platypush/plugins/sensor/bme280/__init__.py @@ -72,7 +72,7 @@ class SensorBme280Plugin(SensorPlugin): super().__init__(**kwargs) self.port = port - self._bus = None + self._smbus = None self._device = None def _get_device(self): @@ -82,8 +82,8 @@ class SensorBme280Plugin(SensorPlugin): if self._device: return self._device - self._bus = SMBus(self.port) - self._device = BME280(i2c_dev=self._bus) + self._smbus = SMBus(self.port) + self._device = BME280(i2c_dev=self._smbus) return self._device @action diff --git a/platypush/plugins/zigbee/mqtt/__init__.py b/platypush/plugins/zigbee/mqtt/__init__.py index e469f57360..73aa88429b 100644 --- a/platypush/plugins/zigbee/mqtt/__init__.py +++ b/platypush/plugins/zigbee/mqtt/__init__.py @@ -18,8 +18,6 @@ from typing import ( import paho.mqtt.client as mqtt -from platypush.bus import Bus -from platypush.context import get_bus from platypush.entities import ( DimmerEntityManager, Entity, @@ -2163,13 +2161,6 @@ class ZigbeeMqttPlugin( return handler - @property - def _bus(self) -> Bus: - """ - Utility property for the bus. - """ - return get_bus() - def _process_state_message(self, client: MqttClient, msg: str): """ Process a state message.