mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-07 21:33:32 +02: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:
@@ -13,17 +13,17 @@ enum HX711Gain {
|
||||
HX711_GAIN_64 = 3,
|
||||
};
|
||||
|
||||
class HX711Sensor : public sensor::PollingSensorComponent {
|
||||
class HX711Sensor : public sensor::Sensor, public PollingComponent {
|
||||
public:
|
||||
HX711Sensor(const std::string &name, GPIOPin *dout, GPIOPin *sck, uint32_t update_interval);
|
||||
void set_dout_pin(GPIOPin *dout_pin) { dout_pin_ = dout_pin; }
|
||||
void set_sck_pin(GPIOPin *sck_pin) { sck_pin_ = sck_pin; }
|
||||
void set_gain(HX711Gain gain) { gain_ = gain; }
|
||||
|
||||
void setup() override;
|
||||
void dump_config() override;
|
||||
float get_setup_priority() const override;
|
||||
void update() override;
|
||||
|
||||
void set_gain(HX711Gain gain);
|
||||
|
||||
protected:
|
||||
bool read_sensor_(uint32_t *result);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user