From 5267635d2c42e27fb091a7de3388db3dd9c501c0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 2 May 2019 16:00:33 +0200 Subject: [PATCH] Polling is default (#23622) --- homeassistant/components/serial_pm/sensor.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/homeassistant/components/serial_pm/sensor.py b/homeassistant/components/serial_pm/sensor.py index 49e61bead05..a6762c4be35 100644 --- a/homeassistant/components/serial_pm/sensor.py +++ b/homeassistant/components/serial_pm/sensor.py @@ -3,15 +3,15 @@ import logging import voluptuous as vol -from homeassistant.const import CONF_NAME -from homeassistant.helpers.entity import Entity -import homeassistant.helpers.config_validation as cv from homeassistant.components.sensor import PLATFORM_SCHEMA +from homeassistant.const import CONF_NAME +import homeassistant.helpers.config_validation as cv +from homeassistant.helpers.entity import Entity _LOGGER = logging.getLogger(__name__) -CONF_SERIAL_DEVICE = 'serial_device' CONF_BRAND = 'brand' +CONF_SERIAL_DEVICE = 'serial_device' PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ vol.Required(CONF_BRAND): cv.string, @@ -82,7 +82,3 @@ class ParticulateMatterSensor(Entity): self._state = self._collector.read_data()[self._pmname] except KeyError: _LOGGER.error("Could not read PM%s value", self._pmname) - - def should_poll(self): - """Sensor needs polling.""" - return True