def add_entities(self, new_entities):
        with self.component.lock:
            for entity in new_entities:
                if self.component.add_entity(entity, self):
                    self.platform_entities.append(entity)

            self.component.update_group()

            if self.is_polling or \
               not any(entity.should_poll for entity
                       in self.platform_entities):
                return

            self.is_polling = True

            track_utc_time_change(
                self.component.hass, self._update_entity_states,
                second=range(0, 60, self.scan_interval))
Add entities for a single platform.
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/helpers/entity_component.py/EntityPlatform.add_entities