esphome-docs/components/sensor/misc/custom-empty.h
Otto Winter 8d9b0d2375
Netlify (#153)
* Netlify

* Fix

* Faster doxygen

* Update Makefile

* Try without api

* Debug

* Fix

* Update Makefile

* Debug

* Try 1.8.13

* Remove debug

* Update Makefile

* Optimize
2019-02-07 13:54:45 +01:00

16 lines
315 B
C++

#include "esphomelib.h"
using namespace esphomelib;
class MyCustomSensor : public PollingComponent, public sensor::Sensor {
public:
MyCustomSensor() : PollingComponent(15000) {}
void setup() override {
// This will be called by App.setup()
}
void update() override {
publish_state(42.0);
}
};