13 #ifdef USE_HOMEASSISTANT_TIME 16 #ifdef USE_BLUETOOTH_PROXY 19 #ifdef USE_VOICE_ASSISTANT 26 static const char *
const TAG =
"api.connection";
27 static const int ESP32_CAMERA_STOP_STREAM = 5000;
30 : parent_(parent), initial_state_iterator_(this), list_entities_iterator_(this) {
33 #if defined(USE_API_PLAINTEXT) 35 #elif defined(USE_API_NOISE) 38 #error "No frame helper defined" 62 ESP_LOGW(TAG,
"%s: Network unavailable, disconnecting",
client_info_.c_str());
79 err =
helper_->read_packet(&buffer);
85 ESP_LOGW(TAG,
"%s: Connection reset",
client_info_.c_str());
87 ESP_LOGW(TAG,
"%s: Connection closed",
client_info_.c_str());
103 const uint32_t keepalive = 60000;
104 const uint32_t now =
millis();
109 ESP_LOGW(TAG,
"%s didn't respond to ping request in time. Disconnecting...", this->
client_info_.c_str());
112 ESP_LOGVV(TAG,
"Sending keepalive PING...");
117 #ifdef USE_ESP32_CAMERA 127 buffer.encode_bool(3, done);
133 if (success && done) {
163 ESP_LOGD(TAG,
"%s requested disconnected",
client_info_.c_str());
172 #ifdef USE_BINARY_SENSOR 210 if (traits.get_supports_tilt())
211 resp.tilt = cover->
tilt;
212 resp.current_operation = static_cast<enums::CoverOperation>(cover->
current_operation);
235 if (cover ==
nullptr)
242 call.set_command_open();
245 call.set_command_close();
248 call.set_command_stop();
255 call.set_tilt(msg.
tilt);
257 call.set_command_stop();
270 resp.state = fan->
state;
271 if (traits.supports_oscillation())
273 if (traits.supports_speed()) {
274 resp.speed_level = fan->
speed;
276 if (traits.supports_direction())
277 resp.direction = static_cast<enums::FanDirection>(fan->
direction);
328 resp.state = values.is_on();
330 resp.brightness = values.get_brightness();
331 resp.color_brightness = values.get_color_brightness();
332 resp.red = values.get_red();
333 resp.green = values.get_green();
334 resp.blue = values.get_blue();
335 resp.white = values.get_white();
336 resp.color_temperature = values.get_color_temperature();
337 resp.cold_white = values.get_cold_white();
338 resp.warm_white = values.get_warm_white();
356 for (
auto mode : traits.get_supported_color_modes())
372 msg.
effects.emplace_back(
"None");
374 msg.
effects.push_back(effect->get_name());
380 if (light ==
nullptr)
423 resp.missing_state = !sensor->
has_state();
473 if (a_switch ==
nullptr)
484 #ifdef USE_TEXT_SENSOR 491 resp.state = std::move(state);
492 resp.missing_state = !text_sensor->
has_state();
520 if (traits.get_supports_current_temperature())
522 if (traits.get_supports_two_point_target_temperature()) {
529 resp.fan_mode = static_cast<enums::ClimateFanMode>(climate->
fan_mode.
value());
537 if (traits.get_supports_swing_modes())
538 resp.swing_mode = static_cast<enums::ClimateSwingMode>(climate->
swing_mode);
557 for (
auto mode : traits.get_supported_modes())
568 for (
auto fan_mode : traits.get_supported_fan_modes())
570 for (
auto const &
custom_fan_mode : traits.get_supported_custom_fan_modes())
572 for (
auto preset : traits.get_supported_presets())
574 for (
auto const &
custom_preset : traits.get_supported_custom_presets())
576 for (
auto swing_mode : traits.get_supported_swing_modes())
582 if (climate ==
nullptr)
587 call.
set_mode(static_cast<climate::ClimateMode>(msg.
mode));
616 resp.missing_state = !number->
has_state();
641 if (number ==
nullptr)
657 resp.state = std::move(state);
658 resp.missing_state = !select->
has_state();
679 if (select ==
nullptr)
704 if (button ==
nullptr)
738 if (a_lock ==
nullptr)
755 #ifdef USE_MEDIA_PLAYER 763 resp.volume = media_player->
volume;
764 resp.muted = media_player->
is_muted();
785 if (media_player ==
nullptr)
802 #ifdef USE_ESP32_CAMERA 840 #ifdef USE_HOMEASSISTANT_TIME 847 #ifdef USE_BLUETOOTH_PROXY 854 service.legacy_data.assign(service.data.begin(), service.data.end());
855 service.data.clear();
858 manufacturer_data.legacy_data.assign(manufacturer_data.data.begin(), manufacturer_data.data.end());
859 manufacturer_data.data.clear();
897 #ifdef USE_VOICE_ASSISTANT 928 buffer.encode_uint32(1, static_cast<uint32_t>(level));
930 buffer.encode_string(3, line, strlen(line));
940 ESP_LOGV(TAG,
"Hello from client: '%s' | API Version %" PRIu32
".%" PRIu32, this->
client_info_.c_str(),
945 resp.api_version_minor = 8;
946 resp.server_info =
App.
get_name() +
" (esphome v" ESPHOME_VERSION
")";
959 ESP_LOGD(TAG,
"%s: Connected successfully", this->
client_info_.c_str());
962 #ifdef USE_HOMEASSISTANT_TIME 976 resp.esphome_version = ESPHOME_VERSION;
978 #if defined(USE_ESP8266) || defined(USE_ESP32) 979 resp.manufacturer =
"Espressif";
980 #elif defined(USE_RP2040) 981 resp.manufacturer =
"Raspberry Pi";
982 #elif defined(USE_HOST) 983 resp.manufacturer =
"Host";
985 resp.model = ESPHOME_BOARD;
986 #ifdef USE_DEEP_SLEEP 989 #ifdef ESPHOME_PROJECT_NAME 990 resp.project_name = ESPHOME_PROJECT_NAME;
991 resp.project_version = ESPHOME_PROJECT_VERSION;
994 resp.webserver_port = USE_WEBSERVER_PORT;
996 #ifdef USE_BLUETOOTH_PROXY 998 ? bluetooth_proxy::ACTIVE_CONNECTIONS_VERSION
999 : bluetooth_proxy::PASSIVE_ONLY_VERSION;
1001 #ifdef USE_VOICE_ASSISTANT 1009 it.callback(msg.
state);
1016 if (service->execute_service(msg)) {
1021 ESP_LOGV(TAG,
"Could not find matching service!");
1030 if (!this->
helper_->can_write_without_blocking()) {
1038 if (!this->
helper_->can_write_without_blocking()) {
1040 if (message_type != 29) {
1041 ESP_LOGV(TAG,
"Cannot send message because of TCP buffer space");
1054 ESP_LOGW(TAG,
"%s: Connection reset",
client_info_.c_str());
1065 ESP_LOGD(TAG,
"%s: tried to access without authentication.", this->
client_info_.c_str());
1069 ESP_LOGD(TAG,
"%s: tried to access without full connection.", this->
client_info_.c_str());
bool get_force_update() const
Get whether force update mode is enabled.
Base class for all switches.
value_type const & value() const
bool send_list_entities_binary_sensor_response(const ListEntitiesBinarySensorResponse &msg)
bool state
The current on/off state of the fan.
bool send_text_sensor_state(text_sensor::TextSensor *text_sensor, std::string state)
ClimateSwingMode swing_mode
The active swing mode of the climate device.
bool has_own_name() const
enums::EntityCategory entity_category
This class represents the communication layer between the front-end MQTT layer and the hardware outpu...
LightCall & set_color_brightness(optional< float > brightness)
Set the color brightness of the light from 0.0 (no color) to 1.0 (fully on)
bool oscillating
The current oscillation state of the fan.
std::string custom_preset
bool has_state() const
Return whether this number has gotten a full state yet.
bool send_fan_state_response(const FanStateResponse &msg)
float visual_min_temperature
bool supports_oscillation
std::vector< uint8_t > * get_buffer() const
void request_image(CameraRequester requester)
media_player::MediaPlayer * get_media_player_by_key(uint32_t key, bool include_internal=false)
bool send_climate_info(climate::Climate *climate)
FanDirection direction
The current direction of the fan.
Base class for all cover devices.
const std::vector< UserServiceDescriptor * > & get_user_services() const
LightCall & set_red(optional< float > red)
Set the red RGB value of the light from 0.0 to 1.0.
void start_stream(CameraRequester requester)
enums::EntityCategory entity_category
LightCall & set_color_temperature(optional< float > color_temperature)
Set the color temperature of the light in mireds for CWWW or RGBWW lights.
bool is_status_binary_sensor
void bluetooth_gatt_notify(const BluetoothGATTNotifyRequest &msg) override
bool send_cover_info(cover::Cover *cover)
bool send_ping_request(const PingRequest &msg)
LightCall & set_cold_white(optional< float > cold_white)
Set the cold white value of the light from 0.0 to 1.0.
bool send_switch_state(switch_::Switch *a_switch, bool state)
int get_bluetooth_connections_limit()
float target_temperature
The target temperature of the climate device.
VoiceAssistant * global_voice_assistant
std::string get_effect_name()
Return the name of the current effect, or if no effect is active "None".
climate::Climate * get_climate_by_key(uint32_t key, bool include_internal=false)
uint32_t transition_length
void on_fatal_error() override
std::string get_device_class()
Get the device class, using the manual override if set.
select::Select * get_select_by_key(uint32_t key, bool include_internal=false)
CoverCall make_call()
Construct a new cover call used to control the cover.
bool global_has_deep_sleep
void on_voice_assistant_response(const VoiceAssistantResponse &msg) override
BluetoothConnectionsFreeResponse subscribe_bluetooth_connections_free(const SubscribeBluetoothConnectionsFreeRequest &msg) override
std::string get_default_unique_id(const std::string &component_type, EntityBase *entity)
InitialStateIterator initial_state_iterator_
const char * api_error_to_str(APIError err)
virtual std::string unique_id()
Override this method to set the unique ID of this sensor.
CoverOperation current_operation
The current operation of the cover (idle, opening, closing).
std::vector< enums::ClimatePreset > supported_presets
enums::EntityCategory entity_category
bool has_target_temperature
bool send_camera_info(esp32_camera::ESP32Camera *camera)
std::vector< std::string > options
bool send_fan_state(fan::Fan *fan)
virtual FanTraits get_traits()=0
bool send_climate_state_response(const ClimateStateResponse &msg)
enums::EntityCategory entity_category
lock::Lock * get_lock_by_key(uint32_t key, bool include_internal=false)
bool send_binary_sensor_state_response(const BinarySensorStateResponse &msg)
bool check_password(const std::string &password) const
bool supports_effects()
Return whether the light has any effects that meet the trait requirements.
bool send_climate_state(climate::Climate *climate)
bool legacy_supports_color_temperature
ClimateMode mode
The active mode of the climate device.
bool send_button_info(button::Button *button)
button::Button * get_button_by_key(uint32_t key, bool include_internal=false)
int32_t supported_speed_count
virtual bool assumed_state()
Return whether this switch uses an assumed state - i.e.
bool send_list_entities_fan_response(const ListEntitiesFanResponse &msg)
DisconnectResponse disconnect(const DisconnectRequest &msg) override
virtual bool is_status_binary_sensor() const
bool send_number_state_response(const NumberStateResponse &msg)
bool send_lock_state(lock::Lock *a_lock, lock::LockState state)
uint32_t api_version_major
uint32_t api_version_major
const std::string & get_friendly_name() const
Get the friendly name of this Application set by pre_setup().
std::unique_ptr< APIFrameHelper > helper_
enums::ClimateSwingMode swing_mode
float target_temperature_high
The maximum target temperature of the climate device, for climate devices with split target temperatu...
void media_player_command(const MediaPlayerCommandRequest &msg) override
float current_temperature
The current temperature of the climate device, as reported from the integration.
bool send_list_entities_select_response(const ListEntitiesSelectResponse &msg)
Color temperature can be controlled.
HomeassistantTime * global_homeassistant_time
LightCall & set_color_mode(optional< ColorMode > color_mode)
Set the color mode of the light.
enums::ColorMode color_mode
void send_camera_state(std::shared_ptr< esp32_camera::CameraImage > image)
std::vector< BluetoothServiceData > service_data
NumberCall & set_value(float value)
void start(struct sockaddr_storage *addr, uint16_t port)
bool supports_two_point_target_temperature
void execute_service(const ExecuteServiceRequest &msg) override
std::vector< std::string > supported_custom_presets
void consume_data(size_t consumed)
LightCall & set_transition_length(optional< uint32_t > transition_length)
Set the transition length of this call in milliseconds.
ClimateCall & set_swing_mode(ClimateSwingMode swing_mode)
Set the swing mode of the climate device.
bool send_number_info(number::Number *number)
uint32_t api_version_minor
float tilt
The current tilt value of the cover from 0.0 to 1.0.
bool is_connected()
Return whether the node is connected to the network (through wifi, eth, ...)
void stop_stream(CameraRequester requester)
std::string get_object_id() const
uint32_t IRAM_ATTR HOT millis()
ClimateSwingMode swing_mode
void on_no_setup_connection() override
bool send_binary_sensor_info(binary_sensor::BinarySensor *binary_sensor)
enums::ClimateFanMode fan_mode
optional< std::string > custom_fan_mode
The active custom fan mode of the climate device.
cover::Cover * get_cover_by_key(uint32_t key, bool include_internal=false)
virtual CoverTraits get_traits()=0
bool voice_assistant_subscription_
void bluetooth_device_request(const api::BluetoothDeviceRequest &msg)
BluetoothProxy * global_bluetooth_proxy
Device is in away preset.
uint8_t * peek_data_buffer()
ClimateCall & set_target_temperature_low(float target_temperature_low)
Set the low point target temperature of the climate device.
bool send_select_info(select::Select *select)
virtual std::string unique_id()
Override this method to set the unique ID of this sensor.
bool send_bluetooth_le_advertisement_response(const BluetoothLEAdvertisementResponse &msg)
ClimateCall make_call()
Make a climate device control call, this is used to control the climate device, see the ClimateCall d...
fan::Fan * get_fan_by_key(uint32_t key, bool include_internal=false)
float visual_max_temperature
void set_epoch_time(uint32_t epoch)
void lock()
Turn this lock on.
int32_t accuracy_decimals
enums::EntityCategory entity_category
std::string get_icon() const
std::shared_ptr< APINoiseContext > get_noise_ctx()
ClimateCall & set_target_temperature(float target_temperature)
Set the target temperature of the climate device.
enums::ClimatePreset preset
bool send_list_entities_text_sensor_response(const ListEntitiesTextSensorResponse &msg)
FanCall & set_speed(int speed)
bool send_sensor_state(sensor::Sensor *sensor, float state)
Brightness of cold and warm white output can be controlled.
void bluetooth_gatt_read(const api::BluetoothGATTReadRequest &msg)
bool has_transition_length
bool send_select_state(select::Select *select, std::string state)
std::vector< std::string > get_options() const
bool send_list_entities_light_response(const ListEntitiesLightResponse &msg)
enums::EntityCategory entity_category
ESP32Camera * global_esp32_camera
optional< ClimatePreset > preset
The active preset of the climate device.
enums::FanDirection direction
uint32_t client_api_version_minor_
std::vector< std::string > effects
bool send_text_sensor_state_response(const TextSensorStateResponse &msg)
virtual bool has_state() const
Return whether this binary sensor has outputted a state.
std::vector< uint8_t > proto_write_buffer_
bool send_list_entities_cover_response(const ListEntitiesCoverResponse &msg)
bool send_log_message(int level, const char *tag, const char *line)
Base-class for all numbers.
Brightness of white channel can be controlled separately from other channels.
int speed
The current fan speed level.
bool send_list_entities_camera_response(const ListEntitiesCameraResponse &msg)
ClimateCall & set_preset(ClimatePreset preset)
Set the preset of the climate device.
std::vector< std::string > supported_custom_fan_modes
BedjetMode mode
BedJet operating mode.
enums::LockCommand command
bool send_list_entities_button_response(const ListEntitiesButtonResponse &msg)
bool supports_current_temperature
ClimateCall & set_fan_mode(ClimateFanMode fan_mode)
Set the fan mode of the climate device.
bool send_media_player_info(media_player::MediaPlayer *media_player)
bool send_list_entities_media_player_response(const ListEntitiesMediaPlayerResponse &msg)
void bluetooth_gatt_write(const BluetoothGATTWriteRequest &msg) override
uint32_t client_api_version_major_
ClimateTraits get_traits()
Get the traits of this climate device with all overrides applied.
void turn_on()
Turn this switch on.
bool send_voice_assistant_request(const VoiceAssistantRequest &msg)
SelectCall make_call()
Instantiate a SelectCall object to modify this select component's state.
std::string get_unit_of_measurement()
Get the unit of measurement, using the manual override if set.
bool send_binary_sensor_state(binary_sensor::BinarySensor *binary_sensor, bool state)
void bluetooth_device_request(const BluetoothDeviceRequest &msg) override
bool send_fan_info(fan::Fan *fan)
float target_temperature_high
FanCall & set_oscillating(bool oscillating)
Application App
Global storage of Application pointer - only one Application can exist.
void bluetooth_gatt_write(const api::BluetoothGATTWriteRequest &msg)
std::string unit_of_measurement
StateClass get_state_class()
Get the state class, using the manual override if set.
bool has_target_temperature_high
enums::EntityCategory entity_category
const std::vector< LightEffect * > & get_effects() const
Get all effects for this light state.
ColorMode get_color_mode() const
Get the color mode of these light color values.
LightCall & set_state(optional< bool > state)
Set the binary ON/OFF state of the light.
void on_disconnect_response(const DisconnectResponse &value) override
light::LightState * get_light_by_key(uint32_t key, bool include_internal=false)
enums::EntityCategory entity_category
void on_get_time_response(const GetTimeResponse &value) override
bool get_assumed_state() const
void button_command(const ButtonCommandRequest &msg) override
void bluetooth_gatt_write_descriptor(const api::BluetoothGATTWriteDescriptorRequest &msg)
Master brightness of the light can be controlled.
void bluetooth_gatt_read_descriptor(const BluetoothGATTReadDescriptorRequest &msg) override
const std::string & get_name() const
Get the name of this Application set by pre_setup().
bool send_list_entities_number_response(const ListEntitiesNumberResponse &msg)
bool send_switch_state_response(const SwitchStateResponse &msg)
bool has_target_temperature_low
bool send_cover_state(cover::Cover *cover)
bool read_message(uint32_t msg_size, uint32_t msg_type, uint8_t *msg_data) override
LightCall & set_warm_white(optional< float > warm_white)
Set the warm white value of the light from 0.0 to 1.0.
void subscribe_home_assistant_states(const SubscribeHomeAssistantStatesRequest &msg) override
switch_::Switch * get_switch_by_key(uint32_t key, bool include_internal=false)
bool send_list_entities_lock_response(const ListEntitiesLockResponse &msg)
std::string unit_of_measurement
bool send_buffer(ProtoWriteBuffer buffer, uint32_t message_type) override
void bluetooth_gatt_write_descriptor(const BluetoothGATTWriteDescriptorRequest &msg) override
void bluetooth_gatt_get_services(const BluetoothGATTGetServicesRequest &msg) override
bool send_list_entities_sensor_response(const ListEntitiesSensorResponse &msg)
const std::string & get_compilation_time() const
std::vector< enums::ClimateFanMode > supported_fan_modes
optional< std::string > custom_preset
The active custom preset mode of the climate device.
LightCall & set_effect(optional< std::string > effect)
Set the effect of the light by its name.
ClimateCall & set_target_temperature_high(float target_temperature_high)
Set the high point target temperature of the climate device.
esp32_camera::CameraImageReader image_reader_
void bluetooth_gatt_notify(const api::BluetoothGATTNotifyRequest &msg)
bool request_voice_assistant(bool start)
void set_image(std::shared_ptr< CameraImage > image)
bool send_select_state_response(const SelectStateResponse &msg)
optional< ClimateFanMode > fan_mode
The active fan mode of the climate device.
float position
The position of the cover from 0.0 (fully closed) to 1.0 (fully open).
void switch_command(const SwitchCommandRequest &msg) override
ConnectResponse connect(const ConnectRequest &msg) override
bool send_light_info(light::LightState *light)
int get_bluetooth_connections_free()
bool has_color_temperature
EntityCategory get_entity_category() const
bool legacy_supports_away
FanCall & set_state(bool binary_state)
void select_command(const SelectCommandRequest &msg) override
float target_temperature_low
std::string custom_fan_mode
bool send_light_state_response(const LightStateResponse &msg)
bool bluetooth_le_advertisement_subscription_
bool send_sensor_info(sensor::Sensor *sensor)
void open()
Open (unlatch) this lock.
DeviceInfoResponse device_info(const DeviceInfoRequest &msg) override
bool send_media_player_state_response(const MediaPlayerStateResponse &msg)
bool send_subscribe_home_assistant_state_response(const SubscribeHomeAssistantStateResponse &msg)
ClimateCall & set_mode(ClimateMode mode)
Set the mode of the climate device.
const std::vector< HomeAssistantStateSubscription > & get_state_subs() const
number::Number * get_number_by_key(uint32_t key, bool include_internal=false)
enums::EntityCategory entity_category
bool send_list_entities_switch_response(const ListEntitiesSwitchResponse &msg)
LightCall & set_flash_length(optional< uint32_t > flash_length)
Start and set the flash length of this call in milliseconds.
bool get_requires_code() const
LightCall & set_green(optional< float > green)
Set the green RGB value of the light from 0.0 to 1.0.
bool uses_password() const
enums::EntityCategory entity_category
Base-class for all selects.
bool send_light_state(light::LightState *light)
std::vector< enums::ColorMode > supported_color_modes
void set_timeout(Component *component, const std::string &name, uint32_t timeout, std::function< void()> func)
void on_unauthenticated_access() override
bool has_state() const
Return whether this sensor has gotten a full state (that passed through all filters) yet...
void bluetooth_gatt_read_descriptor(const api::BluetoothGATTReadDescriptorRequest &msg)
float get_min_value() const
bool has_state() const
Return whether this select component has gotten a full state yet.
void lock_command(const LockCommandRequest &msg) override
std::vector< BluetoothServiceData > manufacturer_data
void unlock()
Turn this lock off.
bool send_media_player_state(media_player::MediaPlayer *media_player)
bool send_sensor_state_response(const SensorStateResponse &msg)
bool send_cover_state_response(const CoverStateResponse &msg)
Base class for all binary_sensor-type classes.
Color can be controlled using RGB format (includes a brightness control for the color).
LightColorValues remote_values
The remote color values reported to the frontend.
float visual_target_temperature_step
LockState
Enum for all states a lock can be in.
void light_command(const LightCommandRequest &msg) override
bool send_lock_info(lock::Lock *a_lock)
NumberMode get_mode() const
bool legacy_supports_brightness
bool send_list_entities_climate_response(const ListEntitiesClimateResponse &msg)
int8_t get_accuracy_decimals()
Get the accuracy in decimals, using the manual override if set.
LightCall & set_white(optional< float > white)
Set the white value value of the light from 0.0 to 1.0 for RGBW[W] lights.
LightCall & set_brightness(optional< float > brightness)
Set the target brightness of the light from 0.0 (fully off) to 1.0 (fully on)
void number_command(const NumberCommandRequest &msg) override
ListEntitiesIterator list_entities_iterator_
bool send_switch_info(switch_::Switch *a_switch)
bool send_text_sensor_info(text_sensor::TextSensor *text_sensor)
enums::LegacyCoverCommand legacy_command
Base-class for all sensors.
std::string get_mac_address_pretty()
Get the device MAC address as a string, in colon-separated uppercase hex notation.
bool send_lock_state_response(const LockStateResponse &msg)
void on_home_assistant_state_response(const HomeAssistantStateResponse &msg) override
LightCall & set_blue(optional< float > blue)
Set the blue RGB value of the light from 0.0 to 1.0.
std::vector< enums::ClimateSwingMode > supported_swing_modes
void on_voice_assistant_event_response(const VoiceAssistantEventResponse &msg) override
enums::SensorStateClass state_class
HelloResponse hello(const HelloRequest &msg) override
float get_max_value() const
bool has_color_brightness
float visual_current_temperature_step
bool send_bluetooth_le_advertisement(const BluetoothLEAdvertisementResponse &msg)
enums::EntityCategory entity_category
enums::EntityCategory entity_category
std::vector< uint8_t > container
bool is_disabled_by_default() const
void climate_command(const ClimateCommandRequest &msg) override
bool send_number_state(number::Number *number, float state)
uint32_t get_version() const
APIConnection(std::unique_ptr< socket::Socket > socket, APIServer *parent)
ProtoWriteBuffer create_buffer() override
bool get_supports_open() const
uint32_t get_object_id_hash()
float target_temperature_low
The minimum target temperature of the climate device, for climate devices with split target temperatu...
SelectCall & set_option(const std::string &option)
void cover_command(const CoverCommandRequest &msg) override
void bluetooth_gatt_send_services(const api::BluetoothGATTGetServicesRequest &msg)
std::vector< enums::ClimateMode > supported_modes
const StringRef & get_name() const
void bluetooth_gatt_read(const BluetoothGATTReadRequest &msg) override
void camera_image(const CameraImageRequest &msg) override
FanCall & set_direction(FanDirection direction)
bool legacy_supports_white_value
Base class for all locks.
ClimateAction action
The active state of the climate device.
ClimateDevice - This is the base class for all climate integrations.
void on_event(const api::VoiceAssistantEventResponse &msg)
void turn_off()
Turn this switch off.
void IRAM_ATTR HOT delay(uint32_t ms)
void fan_command(const FanCommandRequest &msg) override