10 #include "list_entities.h" 23 void setup()
override;
38 #endif // USE_API_NOISE 41 #ifdef USE_BINARY_SENSOR 59 #ifdef USE_TEXT_SENSOR 74 #ifdef USE_MEDIA_PLAYER 78 #ifdef USE_BLUETOOTH_PROXY 94 #ifdef USE_HOMEASSISTANT_TIME 98 #ifdef USE_VOICE_ASSISTANT 112 std::function<
void(std::string)> f);
113 const std::vector<HomeAssistantStateSubscription> &
get_state_subs()
const;
117 std::unique_ptr<socket::Socket>
socket_ =
nullptr;
121 std::vector<std::unique_ptr<APIConnection>>
clients_;
127 std::shared_ptr<APINoiseContext>
noise_ctx_ = std::make_shared<APINoiseContext>();
128 #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 send_bluetooth_gatt_notify_response(const BluetoothGATTNotifyResponse &call)
void send_bluetooth_le_advertisement(const BluetoothLEAdvertisementResponse &call)
void send_bluetooth_device_pairing(uint64_t address, bool paired, esp_err_t error=ESP_OK)
void send_bluetooth_gatt_notify_data_response(const BluetoothGATTNotifyDataResponse &call)
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
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 stop_voice_assistant()
void on_lock_update(lock::Lock *obj) override
void send_homeassistant_service_call(const HomeassistantServiceResponse &call)
void send_bluetooth_gatt_error(uint64_t address, uint16_t handle, esp_err_t error)
void on_cover_update(cover::Cover *obj) override
void on_binary_sensor_update(binary_sensor::BinarySensor *obj, bool state) override
void on_fan_update(fan::Fan *obj) override
void send_bluetooth_device_connection(uint64_t address, bool connected, uint16_t mtu=0, esp_err_t error=ESP_OK)
void send_bluetooth_connections_free(uint8_t free, uint8_t limit)
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
Base class for all automation conditions.
void on_number_update(number::Number *obj, float state) override
void send_bluetooth_device_unpairing(uint64_t address, bool success, esp_err_t error=ESP_OK)
void send_bluetooth_gatt_services_done(uint64_t address)
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 send_bluetooth_gatt_services(const BluetoothGATTGetServicesResponse &call)
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 send_bluetooth_gatt_write_response(const BluetoothGATTWriteResponse &call)
bool uses_password() const
Base-class for all selects.
std::vector< std::unique_ptr< APIConnection > > clients_
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 send_bluetooth_device_clear_cache(uint64_t address, bool success, esp_err_t error=ESP_OK)
void on_shutdown() override
Base-class for all sensors.
void send_bluetooth_gatt_read_response(const BluetoothGATTReadResponse &call)
uint16_t get_port() const
std::array< uint8_t, 32 > psk_t
void set_password(const std::string &password)
APIServer * global_api_server
bool start_voice_assistant()
std::unique_ptr< socket::Socket > socket_
Base class for all locks.
ClimateDevice - This is the base class for all climate integrations.