2019-04-17 12:06:00 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "esphome/core/component.h"
|
2022-03-22 21:45:05 +01:00
|
|
|
#include "esphome/core/component_iterator.h"
|
2019-04-17 12:06:00 +02:00
|
|
|
#include "esphome/core/defines.h"
|
|
|
|
|
|
|
|
namespace esphome {
|
|
|
|
namespace api {
|
|
|
|
|
|
|
|
class APIConnection;
|
|
|
|
|
|
|
|
class ListEntitiesIterator : public ComponentIterator {
|
|
|
|
public:
|
2022-03-22 21:45:05 +01:00
|
|
|
ListEntitiesIterator(APIConnection *client);
|
2019-04-17 12:06:00 +02:00
|
|
|
#ifdef USE_BINARY_SENSOR
|
|
|
|
bool on_binary_sensor(binary_sensor::BinarySensor *binary_sensor) override;
|
|
|
|
#endif
|
|
|
|
#ifdef USE_COVER
|
|
|
|
bool on_cover(cover::Cover *cover) override;
|
|
|
|
#endif
|
|
|
|
#ifdef USE_FAN
|
2022-01-23 10:21:54 +01:00
|
|
|
bool on_fan(fan::Fan *fan) override;
|
2019-04-17 12:06:00 +02:00
|
|
|
#endif
|
|
|
|
#ifdef USE_LIGHT
|
|
|
|
bool on_light(light::LightState *light) override;
|
|
|
|
#endif
|
|
|
|
#ifdef USE_SENSOR
|
|
|
|
bool on_sensor(sensor::Sensor *sensor) override;
|
|
|
|
#endif
|
|
|
|
#ifdef USE_SWITCH
|
|
|
|
bool on_switch(switch_::Switch *a_switch) override;
|
|
|
|
#endif
|
2021-11-29 20:00:51 +01:00
|
|
|
#ifdef USE_BUTTON
|
|
|
|
bool on_button(button::Button *button) override;
|
|
|
|
#endif
|
2019-04-17 12:06:00 +02:00
|
|
|
#ifdef USE_TEXT_SENSOR
|
|
|
|
bool on_text_sensor(text_sensor::TextSensor *text_sensor) override;
|
|
|
|
#endif
|
|
|
|
bool on_service(UserServiceDescriptor *service) override;
|
|
|
|
#ifdef USE_ESP32_CAMERA
|
|
|
|
bool on_camera(esp32_camera::ESP32Camera *camera) override;
|
|
|
|
#endif
|
|
|
|
#ifdef USE_CLIMATE
|
|
|
|
bool on_climate(climate::Climate *climate) override;
|
2021-07-12 21:20:12 +02:00
|
|
|
#endif
|
|
|
|
#ifdef USE_NUMBER
|
|
|
|
bool on_number(number::Number *number) override;
|
2021-08-02 10:00:51 +02:00
|
|
|
#endif
|
2024-03-10 19:52:22 +01:00
|
|
|
#ifdef USE_DATETIME_DATE
|
|
|
|
bool on_date(datetime::DateEntity *date) override;
|
|
|
|
#endif
|
2024-04-09 03:46:35 +02:00
|
|
|
#ifdef USE_DATETIME_TIME
|
|
|
|
bool on_time(datetime::TimeEntity *time) override;
|
|
|
|
#endif
|
2023-10-25 11:00:32 +02:00
|
|
|
#ifdef USE_TEXT
|
|
|
|
bool on_text(text::Text *text) override;
|
|
|
|
#endif
|
2021-08-02 10:00:51 +02:00
|
|
|
#ifdef USE_SELECT
|
|
|
|
bool on_select(select::Select *select) override;
|
2022-02-03 19:24:31 +01:00
|
|
|
#endif
|
|
|
|
#ifdef USE_LOCK
|
|
|
|
bool on_lock(lock::Lock *a_lock) override;
|
2022-06-02 07:00:17 +02:00
|
|
|
#endif
|
2024-04-23 06:47:03 +02:00
|
|
|
#ifdef USE_VALVE
|
|
|
|
bool on_valve(valve::Valve *valve) override;
|
|
|
|
#endif
|
2022-06-02 07:00:17 +02:00
|
|
|
#ifdef USE_MEDIA_PLAYER
|
|
|
|
bool on_media_player(media_player::MediaPlayer *media_player) override;
|
2023-06-15 02:34:39 +02:00
|
|
|
#endif
|
|
|
|
#ifdef USE_ALARM_CONTROL_PANEL
|
|
|
|
bool on_alarm_control_panel(alarm_control_panel::AlarmControlPanel *a_alarm_control_panel) override;
|
2024-04-24 04:35:26 +02:00
|
|
|
#endif
|
|
|
|
#ifdef USE_EVENT
|
|
|
|
bool on_event(event::Event *event) override;
|
2019-04-17 12:06:00 +02:00
|
|
|
#endif
|
|
|
|
bool on_end() override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
APIConnection *client_;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace api
|
|
|
|
} // namespace esphome
|