diff --git a/source/developers/platform_example_sensor.markdown b/source/developers/platform_example_sensor.markdown index 124475f9661..8902faead2d 100644 --- a/source/developers/platform_example_sensor.markdown +++ b/source/developers/platform_example_sensor.markdown @@ -31,19 +31,25 @@ from homeassistant.helpers.entity import Entity def setup_platform(hass, config, add_devices, discovery_info=None): + """Setup the sensor platform.""" add_devices([ExampleSensor()]) class ExampleSensor(Entity): + """Representation of a Sensor.""" + @property def name(self): + """Return the name of the sensor.""" return 'Example Temperature' @property def state(self): + """Return the state of the sensor."" return 23 @property def unit_of_measurement(self): + """Return the unit of measurement.""" return TEMP_CELSIUS ```