1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 14:43:51 +00:00

Cleanup dashboard JS (#491)

* Cleanup dashboard JS

* Add vscode

* Save start_mark/end_mark

* Updates

* Updates

* Remove need for cv.nameable

It's a bit hacky but removes so much bloat from integrations

* Add enum helper

* Document APIs, and Improvements

* Fixes

* Fixes

* Update PULL_REQUEST_TEMPLATE.md

* Updates

* Updates

* Updates
This commit is contained in:
Otto Winter
2019-04-22 21:56:30 +02:00
committed by GitHub
parent 6682c43dfa
commit 8e75980ebd
359 changed files with 4395 additions and 4223 deletions

View File

@@ -19,8 +19,6 @@ using nextion_writer_t = std::function<void(Nextion &)>;
class Nextion : public PollingComponent, public uart::UARTDevice {
public:
Nextion() : PollingComponent(0) {}
/**
* Set the text of a component to a static string.
* @param component The component name.
@@ -189,7 +187,7 @@ class Nextion : public PollingComponent, public uart::UARTDevice {
// ========== INTERNAL METHODS ==========
// (In most use cases you won't need these)
NextionTouchComponent *make_touch_component(const std::string &name, uint8_t page_id, uint8_t component_id);
void register_touch_component(NextionTouchComponent *obj) { this->touch_.push_back(obj); }
void setup() override;
float get_setup_priority() const override;
void update() override;
@@ -222,7 +220,8 @@ class Nextion : public PollingComponent, public uart::UARTDevice {
class NextionTouchComponent : public binary_sensor::BinarySensor {
public:
NextionTouchComponent(const std::string &name, uint8_t page_id, uint8_t component_id);
void set_page_id(uint8_t page_id) { page_id_ = page_id; }
void set_component_id(uint8_t component_id) { component_id_ = component_id; }
void process(uint8_t page_id, uint8_t component_id, bool on);
protected: