Added missing docs

This commit is contained in:
Fabio Manganiello 2020-08-23 00:49:51 +02:00
parent 6bed284e8b
commit 7a7c065754
5 changed files with 17 additions and 3 deletions

View File

@ -51,6 +51,7 @@ Backends
platypush/backend/sensor.arduino.rst platypush/backend/sensor.arduino.rst
platypush/backend/sensor.battery.rst platypush/backend/sensor.battery.rst
platypush/backend/sensor.bme280.rst platypush/backend/sensor.bme280.rst
platypush/backend/sensor.dht.rst
platypush/backend/sensor.distance.rst platypush/backend/sensor.distance.rst
platypush/backend/sensor.distance.vl53l1x.rst platypush/backend/sensor.distance.vl53l1x.rst
platypush/backend/sensor.envirophat.rst platypush/backend/sensor.envirophat.rst

View File

@ -0,0 +1,5 @@
``platypush.backend.sensor.dht``
================================
.. automodule:: platypush.backend.sensor.dht
:members:

View File

@ -0,0 +1,5 @@
``platypush.plugins.gpio.sensor.dht``
=====================================
.. automodule:: platypush.plugins.gpio.sensor.dht
:members:

View File

@ -45,6 +45,7 @@ Plugins
platypush/plugins/gpio.sensor.rst platypush/plugins/gpio.sensor.rst
platypush/plugins/gpio.sensor.accelerometer.rst platypush/plugins/gpio.sensor.accelerometer.rst
platypush/plugins/gpio.sensor.bme280.rst platypush/plugins/gpio.sensor.bme280.rst
platypush/plugins/gpio.sensor.dht.rst
platypush/plugins/gpio.sensor.distance.rst platypush/plugins/gpio.sensor.distance.rst
platypush/plugins/gpio.sensor.distance.vl53l1x.rst platypush/plugins/gpio.sensor.distance.vl53l1x.rst
platypush/plugins/gpio.sensor.envirophat.rst platypush/plugins/gpio.sensor.envirophat.rst

View File

@ -2,9 +2,6 @@ import enum
import os import os
from typing import Optional, Union, Tuple, List from typing import Optional, Union, Tuple, List
import luma.core.interface.serial
import luma.oled.device
from luma.core.render import canvas
from PIL import Image, ImageFont from PIL import Image, ImageFont
from platypush.plugins import Plugin, action from platypush.plugins import Plugin, action
@ -73,6 +70,10 @@ class LumaOledPlugin(Plugin):
:param font: Path to a default TTF font used to display the text. :param font: Path to a default TTF font used to display the text.
:param font_size: Font size - it only applies if ``font`` is set. :param font_size: Font size - it only applies if ``font`` is set.
""" """
import luma.core.interface.serial
import luma.oled.device
from luma.core.render import canvas
super().__init__(**kwargs) super().__init__(**kwargs)
iface_name = interface iface_name = interface
@ -103,6 +104,7 @@ class LumaOledPlugin(Plugin):
""" """
clear the display canvas. clear the display canvas.
""" """
from luma.core.render import canvas
self.device.clear() self.device.clear()
del self.canvas del self.canvas
self.canvas = canvas(self.device) self.canvas = canvas(self.device)