13 #include "list_entities.h" 25 void setup()
override;
40 #endif // USE_API_NOISE 43 #ifdef USE_BINARY_SENSOR 61 #ifdef USE_TEXT_SENSOR 70 #ifdef USE_DATETIME_DATE 73 #ifdef USE_DATETIME_TIME 76 #ifdef USE_DATETIME_DATETIME 91 #ifdef USE_MEDIA_PLAYER 96 #ifdef USE_HOMEASSISTANT_TIME 100 #ifdef USE_ALARM_CONTROL_PANEL 120 std::function<
void(std::string)> f);
122 std::function<
void(std::string)> f);
123 const std::vector<HomeAssistantStateSubscription> &
get_state_subs()
const;
132 std::unique_ptr<socket::Socket>
socket_ =
nullptr;
136 std::vector<std::unique_ptr<APIConnection>>
clients_;
144 std::shared_ptr<APINoiseContext>
noise_ctx_ = std::make_shared<APINoiseContext>();
145 #endif // USE_API_NOISE Base class for all switches.
void handle_disconnect(APIConnection *conn)
This class represents the communication layer between the front-end MQTT layer and the hardware outpu...
bool is_connected() const
Base class for all cover devices.
const std::vector< UserServiceDescriptor * > & get_user_services() const
void on_update(update::UpdateEntity *obj) override
void on_media_player_update(media_player::MediaPlayer *obj) override
void on_select_update(select::Select *obj, const std::string &state, size_t index) override
std::function< void(std::string)> callback
Trigger< std::string, std::string > * client_connected_trigger_
bool check_password(const std::string &password) const
std::vector< HomeAssistantStateSubscription > state_subs_
void on_light_update(light::LightState *obj) override
void set_noise_psk(psk_t psk)
void on_lock_update(lock::Lock *obj) override
void send_homeassistant_service_call(const HomeassistantServiceResponse &call)
void on_cover_update(cover::Cover *obj) override
void on_binary_sensor_update(binary_sensor::BinarySensor *obj, bool state) override
Base-class for all text inputs.
Trigger< std::string, std::string > * client_disconnected_trigger_
void on_fan_update(fan::Fan *obj) override
void on_alarm_control_panel_update(alarm_control_panel::AlarmControlPanel *obj) override
std::shared_ptr< APINoiseContext > noise_ctx_
void on_switch_update(switch_::Switch *obj, bool state) override
std::shared_ptr< APINoiseContext > get_noise_ctx()
void dump_config() override
Trigger< std::string, std::string > * get_client_connected_trigger() const
void on_date_update(datetime::DateEntity *obj) override
void on_datetime_update(datetime::DateTimeEntity *obj) override
Base class for all automation conditions.
void on_text_update(text::Text *obj, const std::string &state) override
void on_number_update(number::Number *obj, float state) override
Base-class for all numbers.
void set_reboot_timeout(uint32_t reboot_timeout)
void on_climate_update(climate::Climate *obj) override
void on_text_sensor_update(text_sensor::TextSensor *obj, const std::string &state) override
optional< std::string > attribute
void register_user_service(UserServiceDescriptor *descriptor)
std::vector< UserServiceDescriptor * > user_services_
void set_port(uint16_t port)
const std::vector< HomeAssistantStateSubscription > & get_state_subs() const
void on_sensor_update(sensor::Sensor *obj, float state) override
void on_event(event::Event *obj, const std::string &event_type) override
bool uses_password() const
Base-class for all selects.
std::vector< std::unique_ptr< APIConnection > > clients_
Implementation of SPI Controller mode.
Base class for all valve devices.
Base class for all binary_sensor-type classes.
bool check(Ts... x) override
float get_setup_priority() const override
void subscribe_home_assistant_state(std::string entity_id, optional< std::string > attribute, std::function< void(std::string)> f)
void on_shutdown() override
Base-class for all sensors.
void get_home_assistant_state(std::string entity_id, optional< std::string > attribute, std::function< void(std::string)> f)
uint16_t get_port() const
void on_valve_update(valve::Valve *obj) override
std::array< uint8_t, 32 > psk_t
Trigger< std::string, std::string > * get_client_disconnected_trigger() const
void set_password(const std::string &password)
APIServer * global_api_server
std::unique_ptr< socket::Socket > socket_
Base class for all locks.
ClimateDevice - This is the base class for all climate integrations.
void on_time_update(datetime::TimeEntity *obj) override