mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-03 03:18:28 +02:00
teleinfo: use text_sensor and sensor. (#1403)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Co-authored-by: Otto winter <otto@otto-winter.com>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
#include "esphome/components/teleinfo/teleinfo.h"
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace teleinfo {
|
||||
|
||||
class TeleInfoSensor : public TeleInfoListener, public sensor::Sensor, public Component {
|
||||
public:
|
||||
TeleInfoSensor(const char *tag);
|
||||
void publish_val(std::string val) override;
|
||||
void dump_config() override;
|
||||
};
|
||||
|
||||
} // namespace teleinfo
|
||||
} // namespace esphome
|
||||
Reference in New Issue
Block a user