···
+
import "api_options.proto";
+
service APIConnection {
+
rpc hello (HelloRequest) returns (HelloResponse) {
+
option (needs_setup_connection) = false;
+
option (needs_authentication) = false;
+
rpc connect (ConnectRequest) returns (ConnectResponse) {
+
option (needs_setup_connection) = false;
+
option (needs_authentication) = false;
+
rpc disconnect (DisconnectRequest) returns (DisconnectResponse) {
+
option (needs_setup_connection) = false;
+
option (needs_authentication) = false;
+
rpc ping (PingRequest) returns (PingResponse) {
+
option (needs_setup_connection) = false;
+
option (needs_authentication) = false;
+
rpc device_info (DeviceInfoRequest) returns (DeviceInfoResponse) {
+
option (needs_authentication) = false;
+
rpc list_entities (ListEntitiesRequest) returns (void) {}
+
rpc subscribe_states (SubscribeStatesRequest) returns (void) {}
+
rpc subscribe_logs (SubscribeLogsRequest) returns (void) {}
+
rpc subscribe_homeassistant_services (SubscribeHomeassistantServicesRequest) returns (void) {}
+
rpc subscribe_home_assistant_states (SubscribeHomeAssistantStatesRequest) returns (void) {}
+
rpc get_time (GetTimeRequest) returns (GetTimeResponse) {
+
option (needs_authentication) = false;
+
rpc execute_service (ExecuteServiceRequest) returns (void) {}
+
rpc noise_encryption_set_key (NoiseEncryptionSetKeyRequest) returns (NoiseEncryptionSetKeyResponse) {}
+
rpc button_command (ButtonCommandRequest) returns (void) {}
+
rpc camera_image (CameraImageRequest) returns (void) {}
+
rpc climate_command (ClimateCommandRequest) returns (void) {}
+
rpc cover_command (CoverCommandRequest) returns (void) {}
+
rpc date_command (DateCommandRequest) returns (void) {}
+
rpc datetime_command (DateTimeCommandRequest) returns (void) {}
+
rpc fan_command (FanCommandRequest) returns (void) {}
+
rpc light_command (LightCommandRequest) returns (void) {}
+
rpc lock_command (LockCommandRequest) returns (void) {}
+
rpc media_player_command (MediaPlayerCommandRequest) returns (void) {}
+
rpc number_command (NumberCommandRequest) returns (void) {}
+
rpc select_command (SelectCommandRequest) returns (void) {}
+
rpc siren_command (SirenCommandRequest) returns (void) {}
+
rpc switch_command (SwitchCommandRequest) returns (void) {}
+
rpc text_command (TextCommandRequest) returns (void) {}
+
rpc time_command (TimeCommandRequest) returns (void) {}
+
rpc update_command (UpdateCommandRequest) returns (void) {}
+
rpc valve_command (ValveCommandRequest) returns (void) {}
+
rpc subscribe_bluetooth_le_advertisements(SubscribeBluetoothLEAdvertisementsRequest) returns (void) {}
+
rpc bluetooth_device_request(BluetoothDeviceRequest) returns (void) {}
+
rpc bluetooth_gatt_get_services(BluetoothGATTGetServicesRequest) returns (void) {}
+
rpc bluetooth_gatt_read(BluetoothGATTReadRequest) returns (void) {}
+
rpc bluetooth_gatt_write(BluetoothGATTWriteRequest) returns (void) {}
+
rpc bluetooth_gatt_read_descriptor(BluetoothGATTReadDescriptorRequest) returns (void) {}
+
rpc bluetooth_gatt_write_descriptor(BluetoothGATTWriteDescriptorRequest) returns (void) {}
+
rpc bluetooth_gatt_notify(BluetoothGATTNotifyRequest) returns (void) {}
+
rpc subscribe_bluetooth_connections_free(SubscribeBluetoothConnectionsFreeRequest) returns (BluetoothConnectionsFreeResponse) {}
+
rpc unsubscribe_bluetooth_le_advertisements(UnsubscribeBluetoothLEAdvertisementsRequest) returns (void) {}
+
rpc bluetooth_scanner_set_mode(BluetoothScannerSetModeRequest) returns (void) {}
+
rpc subscribe_voice_assistant(SubscribeVoiceAssistantRequest) returns (void) {}
+
rpc voice_assistant_get_configuration(VoiceAssistantConfigurationRequest) returns (VoiceAssistantConfigurationResponse) {}
+
rpc voice_assistant_set_configuration(VoiceAssistantSetConfiguration) returns (void) {}
+
rpc alarm_control_panel_command (AlarmControlPanelCommandRequest) returns (void) {}
+
// ==================== BASE PACKETS ====================
+
// The Home Assistant protocol is structured as a simple
+
// TCP socket with short binary messages encoded in the protocol buffers format
+
// First, a message in this protocol has a specific format:
+
// * VarInt denoting the size of the message object. (type is not part of this)
+
// * VarInt denoting the type of message.
+
// * The message object encoded as a ProtoBuf message
+
// The connection is established in 4 steps:
+
// * First, the client connects to the server and sends a "Hello Request" identifying itself
+
// * The server responds with a "Hello Response" and selects the protocol version
+
// * After receiving this message, the client attempts to authenticate itself using
+
// the password and a "Connect Request"
+
// * The server responds with a "Connect Response" and notifies of invalid password.
+
// If anything in this initial process fails, the connection must immediately closed
+
// by both sides and _no_ disconnection message is to be sent.
+
// Message sent at the beginning of each connection
+
// Can only be sent by the client and only at the beginning of the connection
+
option (source) = SOURCE_CLIENT;
+
option (no_delay) = true;
+
// Description of client (like User Agent)
+
// For example "Home Assistant"
+
// Not strictly necessary to send but nice for debugging
+
string client_info = 1;
+
uint32 api_version_major = 2;
+
uint32 api_version_minor = 3;
+
// Confirmation of successful connection request.
+
// Can only be sent by the server and only at the beginning of the connection
+
message HelloResponse {
+
option (source) = SOURCE_SERVER;
+
option (no_delay) = true;
+
// The version of the API to use. The _client_ (for example Home Assistant) needs to check
+
// for compatibility and if necessary adopt to an older API.
+
// Major is for breaking changes in the base protocol - a mismatch will lead to immediate disconnect_client_
+
// Minor is for breaking changes in individual messages - a mismatch will lead to a warning message
+
uint32 api_version_major = 1;
+
uint32 api_version_minor = 2;
+
// A string identifying the server (ESP); like client info this may be empty
+
// and only exists for debugging/logging purposes.
+
// For example "ESPHome v1.10.0 on ESP8266"
+
string server_info = 3;
+
// The name of the server (App.get_name())
+
// Message sent at the beginning of each connection to authenticate the client
+
// Can only be sent by the client and only at the beginning of the connection
+
message ConnectRequest {
+
option (source) = SOURCE_CLIENT;
+
option (no_delay) = true;
+
// The password to log in with
+
// Confirmation of successful connection. After this the connection is available for all traffic.
+
// Can only be sent by the server and only at the beginning of the connection
+
message ConnectResponse {
+
option (source) = SOURCE_SERVER;
+
option (no_delay) = true;
+
bool invalid_password = 1;
+
// Request to close the connection.
+
// Can be sent by both the client and server
+
message DisconnectRequest {
+
option (source) = SOURCE_BOTH;
+
option (no_delay) = true;
+
// Do not close the connection before the acknowledgement arrives
+
message DisconnectResponse {
+
option (source) = SOURCE_BOTH;
+
option (no_delay) = true;
+
// Empty - Both parties are required to close the connection after this
+
// message has been received.
+
option (source) = SOURCE_BOTH;
+
option (source) = SOURCE_BOTH;
+
message DeviceInfoRequest {
+
option (source) = SOURCE_CLIENT;
+
message DeviceInfoResponse {
+
option (source) = SOURCE_SERVER;
+
bool uses_password = 1;
+
// The name of the node, given by "App.set_name()"
+
// The mac address of the device. For example "AC:BC:32:89:0E:A9"
+
string mac_address = 3;
+
// A string describing the ESPHome version. For example "1.10.0"
+
string esphome_version = 4;
+
// A string describing the date of compilation, this is generated by the compiler
+
// and therefore may not be in the same format all the time.
+
// If the user isn't using ESPHome, this will also not be set.
+
string compilation_time = 5;
+
// The model of the board. For example NodeMCU
+
bool has_deep_sleep = 7;
+
// The esphome project details if set
+
string project_name = 8;
+
string project_version = 9;
+
uint32 webserver_port = 10;
+
uint32 legacy_bluetooth_proxy_version = 11;
+
uint32 bluetooth_proxy_feature_flags = 15;
+
string manufacturer = 12;
+
string friendly_name = 13;
+
uint32 legacy_voice_assistant_version = 14;
+
uint32 voice_assistant_feature_flags = 17;
+
string suggested_area = 16;
+
// The Bluetooth mac address of the device. For example "AC:BC:32:89:0E:AA"
+
string bluetooth_mac_address = 18;
+
// Supports receiving and saving api encryption key
+
bool api_encryption_supported = 19;
+
repeated DeviceInfo devices = 20;
+
repeated AreaInfo areas = 21;
+
// Top-level area info to phase out suggested_area
+
message ListEntitiesRequest {
+
option (source) = SOURCE_CLIENT;
+
message ListEntitiesDoneResponse {
+
option (source) = SOURCE_SERVER;
+
option (no_delay) = true;
+
message SubscribeStatesRequest {
+
option (source) = SOURCE_CLIENT;
+
// ==================== COMMON =====================
+
ENTITY_CATEGORY_NONE = 0;
+
ENTITY_CATEGORY_CONFIG = 1;
+
ENTITY_CATEGORY_DIAGNOSTIC = 2;
+
// ==================== BINARY SENSOR ====================
+
message ListEntitiesBinarySensorResponse {
+
option (base_class) = "InfoResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_BINARY_SENSOR";
+
string device_class = 5;
+
bool is_status_binary_sensor = 6;
+
bool disabled_by_default = 7;
+
EntityCategory entity_category = 9;
+
message BinarySensorStateResponse {
+
option (base_class) = "StateResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_BINARY_SENSOR";
+
option (no_delay) = true;
+
// If the binary sensor does not have a valid state yet.
+
// Equivalent to `!obj->has_state()` - inverse logic to make state packets smaller
+
bool missing_state = 3;
+
// ==================== COVER ====================
+
message ListEntitiesCoverResponse {
+
option (base_class) = "InfoResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_COVER";
+
bool assumed_state = 5;
+
bool supports_position = 6;
+
bool supports_tilt = 7;
+
string device_class = 8;
+
bool disabled_by_default = 9;
+
EntityCategory entity_category = 11;
+
bool supports_stop = 12;
+
enum LegacyCoverState {
+
LEGACY_COVER_STATE_OPEN = 0;
+
LEGACY_COVER_STATE_CLOSED = 1;
+
COVER_OPERATION_IDLE = 0;
+
COVER_OPERATION_IS_OPENING = 1;
+
COVER_OPERATION_IS_CLOSING = 2;
+
message CoverStateResponse {
+
option (base_class) = "StateResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_COVER";
+
option (no_delay) = true;
+
// legacy: state has been removed in 1.13
+
// clients/servers must still send/accept it until the next protocol change
+
LegacyCoverState legacy_state = 2;
+
CoverOperation current_operation = 5;
+
enum LegacyCoverCommand {
+
LEGACY_COVER_COMMAND_OPEN = 0;
+
LEGACY_COVER_COMMAND_CLOSE = 1;
+
LEGACY_COVER_COMMAND_STOP = 2;
+
message CoverCommandRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_COVER";
+
option (no_delay) = true;
+
// legacy: command has been removed in 1.13
+
// clients/servers must still send/accept it until the next protocol change
+
bool has_legacy_command = 2;
+
LegacyCoverCommand legacy_command = 3;
+
// ==================== FAN ====================
+
message ListEntitiesFanResponse {
+
option (base_class) = "InfoResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_FAN";
+
bool supports_oscillation = 5;
+
bool supports_speed = 6;
+
bool supports_direction = 7;
+
int32 supported_speed_count = 8;
+
bool disabled_by_default = 9;
+
EntityCategory entity_category = 11;
+
repeated string supported_preset_modes = 12;
+
FAN_DIRECTION_FORWARD = 0;
+
FAN_DIRECTION_REVERSE = 1;
+
message FanStateResponse {
+
option (base_class) = "StateResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_FAN";
+
option (no_delay) = true;
+
FanSpeed speed = 4 [deprecated = true];
+
FanDirection direction = 5;
+
string preset_mode = 7;
+
message FanCommandRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_FAN";
+
option (no_delay) = true;
+
bool has_speed = 4 [deprecated = true];
+
FanSpeed speed = 5 [deprecated = true];
+
bool has_oscillating = 6;
+
bool has_direction = 8;
+
FanDirection direction = 9;
+
bool has_speed_level = 10;
+
int32 speed_level = 11;
+
bool has_preset_mode = 12;
+
string preset_mode = 13;
+
// ==================== LIGHT ====================
+
COLOR_MODE_UNKNOWN = 0;
+
COLOR_MODE_LEGACY_BRIGHTNESS = 2;
+
COLOR_MODE_BRIGHTNESS = 3;
+
COLOR_MODE_COLOR_TEMPERATURE = 11;
+
COLOR_MODE_COLD_WARM_WHITE = 19;
+
COLOR_MODE_RGB_WHITE = 39;
+
COLOR_MODE_RGB_COLOR_TEMPERATURE = 47;
+
COLOR_MODE_RGB_COLD_WARM_WHITE = 51;
+
message ListEntitiesLightResponse {
+
option (base_class) = "InfoResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_LIGHT";
+
repeated ColorMode supported_color_modes = 12;
+
// next four supports_* are for legacy clients, newer clients should use color modes
+
bool legacy_supports_brightness = 5 [deprecated=true];
+
bool legacy_supports_rgb = 6 [deprecated=true];
+
bool legacy_supports_white_value = 7 [deprecated=true];
+
bool legacy_supports_color_temperature = 8 [deprecated=true];
+
repeated string effects = 11;
+
bool disabled_by_default = 13;
+
EntityCategory entity_category = 15;
+
message LightStateResponse {
+
option (base_class) = "StateResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_LIGHT";
+
option (no_delay) = true;
+
ColorMode color_mode = 11;
+
float color_brightness = 10;
+
float color_temperature = 8;
+
message LightCommandRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_LIGHT";
+
option (no_delay) = true;
+
bool has_brightness = 4;
+
bool has_color_mode = 22;
+
ColorMode color_mode = 23;
+
bool has_color_brightness = 20;
+
float color_brightness = 21;
+
bool has_color_temperature = 12;
+
float color_temperature = 13;
+
bool has_cold_white = 24;
+
bool has_warm_white = 26;
+
bool has_transition_length = 14;
+
uint32 transition_length = 15;
+
bool has_flash_length = 16;
+
uint32 flash_length = 17;
+
// ==================== SENSOR ====================
+
enum SensorStateClass {
+
STATE_CLASS_MEASUREMENT = 1;
+
STATE_CLASS_TOTAL_INCREASING = 2;
+
enum SensorLastResetType {
+
message ListEntitiesSensorResponse {
+
option (base_class) = "InfoResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_SENSOR";
+
string unit_of_measurement = 6;
+
int32 accuracy_decimals = 7;
+
string device_class = 9;
+
SensorStateClass state_class = 10;
+
// Last reset type removed in 2021.9.0
+
SensorLastResetType legacy_last_reset_type = 11;
+
bool disabled_by_default = 12;
+
EntityCategory entity_category = 13;
+
message SensorStateResponse {
+
option (base_class) = "StateResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_SENSOR";
+
option (no_delay) = true;
+
// If the sensor does not have a valid state yet.
+
// Equivalent to `!obj->has_state()` - inverse logic to make state packets smaller
+
bool missing_state = 3;
+
// ==================== SWITCH ====================
+
message ListEntitiesSwitchResponse {
+
option (base_class) = "InfoResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_SWITCH";
+
bool assumed_state = 6;
+
bool disabled_by_default = 7;
+
EntityCategory entity_category = 8;
+
string device_class = 9;
+
message SwitchStateResponse {
+
option (base_class) = "StateResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_SWITCH";
+
option (no_delay) = true;
+
message SwitchCommandRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_SWITCH";
+
option (no_delay) = true;
+
// ==================== TEXT SENSOR ====================
+
message ListEntitiesTextSensorResponse {
+
option (base_class) = "InfoResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_TEXT_SENSOR";
+
bool disabled_by_default = 6;
+
EntityCategory entity_category = 7;
+
string device_class = 8;
+
message TextSensorStateResponse {
+
option (base_class) = "StateResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_TEXT_SENSOR";
+
option (no_delay) = true;
+
// If the text sensor does not have a valid state yet.
+
// Equivalent to `!obj->has_state()` - inverse logic to make state packets smaller
+
bool missing_state = 3;
+
// ==================== SUBSCRIBE LOGS ====================
+
LOG_LEVEL_VERY_VERBOSE = 7;
+
message SubscribeLogsRequest {
+
option (source) = SOURCE_CLIENT;
+
message SubscribeLogsResponse {
+
option (source) = SOURCE_SERVER;
+
option (no_delay) = false;
+
// ==================== NOISE ENCRYPTION ====================
+
message NoiseEncryptionSetKeyRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_API_NOISE";
+
message NoiseEncryptionSetKeyResponse {
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_API_NOISE";
+
// ==================== HOMEASSISTANT.SERVICE ====================
+
message SubscribeHomeassistantServicesRequest {
+
option (source) = SOURCE_CLIENT;
+
message HomeassistantServiceMap {
+
message HomeassistantServiceResponse {
+
option (source) = SOURCE_SERVER;
+
option (no_delay) = true;
+
repeated HomeassistantServiceMap data = 2;
+
repeated HomeassistantServiceMap data_template = 3;
+
repeated HomeassistantServiceMap variables = 4;
+
// ==================== IMPORT HOME ASSISTANT STATES ====================
+
// 1. Client sends SubscribeHomeAssistantStatesRequest
+
// 2. Server responds with zero or more SubscribeHomeAssistantStateResponse (async)
+
// 3. Client sends HomeAssistantStateResponse for state changes.
+
message SubscribeHomeAssistantStatesRequest {
+
option (source) = SOURCE_CLIENT;
+
message SubscribeHomeAssistantStateResponse {
+
option (source) = SOURCE_SERVER;
+
message HomeAssistantStateResponse {
+
option (source) = SOURCE_CLIENT;
+
option (no_delay) = true;
+
// ==================== IMPORT TIME ====================
+
message GetTimeRequest {
+
option (source) = SOURCE_BOTH;
+
message GetTimeResponse {
+
option (source) = SOURCE_BOTH;
+
option (no_delay) = true;
+
fixed32 epoch_seconds = 1;
+
// ==================== USER-DEFINES SERVICES ====================
+
SERVICE_ARG_TYPE_BOOL = 0;
+
SERVICE_ARG_TYPE_INT = 1;
+
SERVICE_ARG_TYPE_FLOAT = 2;
+
SERVICE_ARG_TYPE_STRING = 3;
+
SERVICE_ARG_TYPE_BOOL_ARRAY = 4;
+
SERVICE_ARG_TYPE_INT_ARRAY = 5;
+
SERVICE_ARG_TYPE_FLOAT_ARRAY = 6;
+
SERVICE_ARG_TYPE_STRING_ARRAY = 7;
+
message ListEntitiesServicesArgument {
+
ServiceArgType type = 2;
+
message ListEntitiesServicesResponse {
+
option (source) = SOURCE_SERVER;
+
repeated ListEntitiesServicesArgument args = 3;
+
message ExecuteServiceArgument {
+
// ESPHome 1.14 (api v1.3) make int a signed value
+
repeated bool bool_array = 6 [packed=false];
+
repeated sint32 int_array = 7 [packed=false];
+
repeated float float_array = 8 [packed=false];
+
repeated string string_array = 9;
+
message ExecuteServiceRequest {
+
option (source) = SOURCE_CLIENT;
+
option (no_delay) = true;
+
repeated ExecuteServiceArgument args = 2;
+
// ==================== CAMERA ====================
+
message ListEntitiesCameraResponse {
+
option (base_class) = "InfoResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_CAMERA";
+
bool disabled_by_default = 5;
+
EntityCategory entity_category = 7;
+
message CameraImageResponse {
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_CAMERA";
+
message CameraImageRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_CAMERA";
+
option (no_delay) = true;
+
// ==================== CLIMATE ====================
+
CLIMATE_MODE_HEAT_COOL = 1;
+
CLIMATE_MODE_FAN_ONLY = 4;
+
CLIMATE_FAN_MEDIUM = 4;
+
CLIMATE_FAN_MIDDLE = 6;
+
CLIMATE_FAN_DIFFUSE = 8;
+
enum ClimateSwingMode {
+
CLIMATE_SWING_BOTH = 1;
+
CLIMATE_SWING_VERTICAL = 2;
+
CLIMATE_SWING_HORIZONTAL = 3;
+
CLIMATE_ACTION_OFF = 0;
+
// values same as mode for readability
+
CLIMATE_ACTION_COOLING = 2;
+
CLIMATE_ACTION_HEATING = 3;
+
CLIMATE_ACTION_IDLE = 4;
+
CLIMATE_ACTION_DRYING = 5;
+
CLIMATE_ACTION_FAN = 6;
+
CLIMATE_PRESET_NONE = 0;
+
CLIMATE_PRESET_HOME = 1;
+
CLIMATE_PRESET_AWAY = 2;
+
CLIMATE_PRESET_BOOST = 3;
+
CLIMATE_PRESET_COMFORT = 4;
+
CLIMATE_PRESET_ECO = 5;
+
CLIMATE_PRESET_SLEEP = 6;
+
CLIMATE_PRESET_ACTIVITY = 7;
+
message ListEntitiesClimateResponse {
+
option (base_class) = "InfoResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_CLIMATE";
+
bool supports_current_temperature = 5;
+
bool supports_two_point_target_temperature = 6;
+
repeated ClimateMode supported_modes = 7;
+
float visual_min_temperature = 8;
+
float visual_max_temperature = 9;
+
float visual_target_temperature_step = 10;
+
// for older peer versions - in new system this
+
// is if CLIMATE_PRESET_AWAY exists is supported_presets
+
bool legacy_supports_away = 11;
+
bool supports_action = 12;
+
repeated ClimateFanMode supported_fan_modes = 13;
+
repeated ClimateSwingMode supported_swing_modes = 14;
+
repeated string supported_custom_fan_modes = 15;
+
repeated ClimatePreset supported_presets = 16;
+
repeated string supported_custom_presets = 17;
+
bool disabled_by_default = 18;
+
EntityCategory entity_category = 20;
+
float visual_current_temperature_step = 21;
+
bool supports_current_humidity = 22;
+
bool supports_target_humidity = 23;
+
float visual_min_humidity = 24;
+
float visual_max_humidity = 25;
+
message ClimateStateResponse {
+
option (base_class) = "StateResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_CLIMATE";
+
option (no_delay) = true;
+
float current_temperature = 3;
+
float target_temperature = 4;
+
float target_temperature_low = 5;
+
float target_temperature_high = 6;
+
// For older peers, equal to preset == CLIMATE_PRESET_AWAY
+
bool unused_legacy_away = 7;
+
ClimateAction action = 8;
+
ClimateFanMode fan_mode = 9;
+
ClimateSwingMode swing_mode = 10;
+
string custom_fan_mode = 11;
+
ClimatePreset preset = 12;
+
string custom_preset = 13;
+
float current_humidity = 14;
+
float target_humidity = 15;
+
message ClimateCommandRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_CLIMATE";
+
option (no_delay) = true;
+
bool has_target_temperature = 4;
+
float target_temperature = 5;
+
bool has_target_temperature_low = 6;
+
float target_temperature_low = 7;
+
bool has_target_temperature_high = 8;
+
float target_temperature_high = 9;
+
// legacy, for older peers, newer ones should use CLIMATE_PRESET_AWAY in preset
+
bool unused_has_legacy_away = 10;
+
bool unused_legacy_away = 11;
+
bool has_fan_mode = 12;
+
ClimateFanMode fan_mode = 13;
+
bool has_swing_mode = 14;
+
ClimateSwingMode swing_mode = 15;
+
bool has_custom_fan_mode = 16;
+
string custom_fan_mode = 17;
+
ClimatePreset preset = 19;
+
bool has_custom_preset = 20;
+
string custom_preset = 21;
+
bool has_target_humidity = 22;
+
float target_humidity = 23;
+
// ==================== NUMBER ====================
+
NUMBER_MODE_SLIDER = 2;
+
message ListEntitiesNumberResponse {
+
option (base_class) = "InfoResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_NUMBER";
+
bool disabled_by_default = 9;
+
EntityCategory entity_category = 10;
+
string unit_of_measurement = 11;
+
string device_class = 13;
+
message NumberStateResponse {
+
option (base_class) = "StateResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_NUMBER";
+
option (no_delay) = true;
+
// If the number does not have a valid state yet.
+
// Equivalent to `!obj->has_state()` - inverse logic to make state packets smaller
+
bool missing_state = 3;
+
message NumberCommandRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_NUMBER";
+
option (no_delay) = true;
+
// ==================== SELECT ====================
+
message ListEntitiesSelectResponse {
+
option (base_class) = "InfoResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_SELECT";
+
repeated string options = 6;
+
bool disabled_by_default = 7;
+
EntityCategory entity_category = 8;
+
message SelectStateResponse {
+
option (base_class) = "StateResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_SELECT";
+
option (no_delay) = true;
+
// If the select does not have a valid state yet.
+
// Equivalent to `!obj->has_state()` - inverse logic to make state packets smaller
+
bool missing_state = 3;
+
message SelectCommandRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_SELECT";
+
option (no_delay) = true;
+
// ==================== SIREN ====================
+
message ListEntitiesSirenResponse {
+
option (base_class) = "InfoResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_SIREN";
+
bool disabled_by_default = 6;
+
repeated string tones = 7;
+
bool supports_duration = 8;
+
bool supports_volume = 9;
+
EntityCategory entity_category = 10;
+
message SirenStateResponse {
+
option (base_class) = "StateResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_SIREN";
+
option (no_delay) = true;
+
message SirenCommandRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_SIREN";
+
option (no_delay) = true;
+
// ==================== LOCK ====================
+
LOCK_STATE_UNLOCKED = 2;
+
LOCK_STATE_LOCKING = 4;
+
LOCK_STATE_UNLOCKING = 5;
+
message ListEntitiesLockResponse {
+
option (base_class) = "InfoResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_LOCK";
+
bool disabled_by_default = 6;
+
EntityCategory entity_category = 7;
+
bool assumed_state = 8;
+
bool supports_open = 9;
+
bool requires_code = 10;
+
// Not yet implemented:
+
string code_format = 11;
+
message LockStateResponse {
+
option (base_class) = "StateResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_LOCK";
+
option (no_delay) = true;
+
message LockCommandRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_LOCK";
+
option (no_delay) = true;
+
LockCommand command = 2;
+
// Not yet implemented:
+
// ==================== BUTTON ====================
+
message ListEntitiesButtonResponse {
+
option (base_class) = "InfoResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_BUTTON";
+
bool disabled_by_default = 6;
+
EntityCategory entity_category = 7;
+
string device_class = 8;
+
message ButtonCommandRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_BUTTON";
+
option (no_delay) = true;
+
// ==================== MEDIA PLAYER ====================
+
enum MediaPlayerState {
+
MEDIA_PLAYER_STATE_NONE = 0;
+
MEDIA_PLAYER_STATE_IDLE = 1;
+
MEDIA_PLAYER_STATE_PLAYING = 2;
+
MEDIA_PLAYER_STATE_PAUSED = 3;
+
enum MediaPlayerCommand {
+
MEDIA_PLAYER_COMMAND_PLAY = 0;
+
MEDIA_PLAYER_COMMAND_PAUSE = 1;
+
MEDIA_PLAYER_COMMAND_STOP = 2;
+
MEDIA_PLAYER_COMMAND_MUTE = 3;
+
MEDIA_PLAYER_COMMAND_UNMUTE = 4;
+
enum MediaPlayerFormatPurpose {
+
MEDIA_PLAYER_FORMAT_PURPOSE_DEFAULT = 0;
+
MEDIA_PLAYER_FORMAT_PURPOSE_ANNOUNCEMENT = 1;
+
message MediaPlayerSupportedFormat {
+
option (ifdef) = "USE_MEDIA_PLAYER";
+
uint32 sample_rate = 2;
+
uint32 num_channels = 3;
+
MediaPlayerFormatPurpose purpose = 4;
+
uint32 sample_bytes = 5;
+
message ListEntitiesMediaPlayerResponse {
+
option (base_class) = "InfoResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_MEDIA_PLAYER";
+
bool disabled_by_default = 6;
+
EntityCategory entity_category = 7;
+
bool supports_pause = 8;
+
repeated MediaPlayerSupportedFormat supported_formats = 9;
+
message MediaPlayerStateResponse {
+
option (base_class) = "StateResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_MEDIA_PLAYER";
+
option (no_delay) = true;
+
MediaPlayerState state = 2;
+
message MediaPlayerCommandRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_MEDIA_PLAYER";
+
option (no_delay) = true;
+
MediaPlayerCommand command = 3;
+
bool has_media_url = 6;
+
bool has_announcement = 8;
+
// ==================== BLUETOOTH ====================
+
message SubscribeBluetoothLEAdvertisementsRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
+
message BluetoothServiceData {
+
repeated uint32 legacy_data = 2 [deprecated = true]; // Removed in api version 1.7
+
bytes data = 3; // Added in api version 1.7
+
message BluetoothLEAdvertisementResponse {
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
+
option (no_delay) = true;
+
repeated string service_uuids = 4;
+
repeated BluetoothServiceData service_data = 5;
+
repeated BluetoothServiceData manufacturer_data = 6;
+
uint32 address_type = 7;
+
message BluetoothLERawAdvertisement {
+
uint32 address_type = 3;
+
message BluetoothLERawAdvertisementsResponse {
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
+
option (no_delay) = true;
+
repeated BluetoothLERawAdvertisement advertisements = 1;
+
enum BluetoothDeviceRequestType {
+
BLUETOOTH_DEVICE_REQUEST_TYPE_CONNECT = 0;
+
BLUETOOTH_DEVICE_REQUEST_TYPE_DISCONNECT = 1;
+
BLUETOOTH_DEVICE_REQUEST_TYPE_PAIR = 2;
+
BLUETOOTH_DEVICE_REQUEST_TYPE_UNPAIR = 3;
+
BLUETOOTH_DEVICE_REQUEST_TYPE_CONNECT_V3_WITH_CACHE = 4;
+
BLUETOOTH_DEVICE_REQUEST_TYPE_CONNECT_V3_WITHOUT_CACHE = 5;
+
BLUETOOTH_DEVICE_REQUEST_TYPE_CLEAR_CACHE = 6;
+
message BluetoothDeviceRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
+
BluetoothDeviceRequestType request_type = 2;
+
bool has_address_type = 3;
+
uint32 address_type = 4;
+
message BluetoothDeviceConnectionResponse {
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
+
message BluetoothGATTGetServicesRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
+
message BluetoothGATTDescriptor {
+
repeated uint64 uuid = 1;
+
message BluetoothGATTCharacteristic {
+
repeated uint64 uuid = 1;
+
repeated BluetoothGATTDescriptor descriptors = 4;
+
message BluetoothGATTService {
+
repeated uint64 uuid = 1;
+
repeated BluetoothGATTCharacteristic characteristics = 3;
+
message BluetoothGATTGetServicesResponse {
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
+
repeated BluetoothGATTService services = 2;
+
message BluetoothGATTGetServicesDoneResponse {
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
+
message BluetoothGATTReadRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
+
message BluetoothGATTReadResponse {
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
+
message BluetoothGATTWriteRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
+
message BluetoothGATTReadDescriptorRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
+
message BluetoothGATTWriteDescriptorRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
+
message BluetoothGATTNotifyRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
+
message BluetoothGATTNotifyDataResponse {
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
+
message SubscribeBluetoothConnectionsFreeRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
+
message BluetoothConnectionsFreeResponse {
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
+
repeated uint64 allocated = 3;
+
message BluetoothGATTErrorResponse {
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
+
message BluetoothGATTWriteResponse {
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
+
message BluetoothGATTNotifyResponse {
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
+
message BluetoothDevicePairingResponse {
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
+
message BluetoothDeviceUnpairingResponse {
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
+
message UnsubscribeBluetoothLEAdvertisementsRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
+
message BluetoothDeviceClearCacheResponse {
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
+
enum BluetoothScannerState {
+
BLUETOOTH_SCANNER_STATE_IDLE = 0;
+
BLUETOOTH_SCANNER_STATE_STARTING = 1;
+
BLUETOOTH_SCANNER_STATE_RUNNING = 2;
+
BLUETOOTH_SCANNER_STATE_FAILED = 3;
+
BLUETOOTH_SCANNER_STATE_STOPPING = 4;
+
BLUETOOTH_SCANNER_STATE_STOPPED = 5;
+
enum BluetoothScannerMode {
+
BLUETOOTH_SCANNER_MODE_PASSIVE = 0;
+
BLUETOOTH_SCANNER_MODE_ACTIVE = 1;
+
message BluetoothScannerStateResponse {
+
option(source) = SOURCE_SERVER;
+
option(ifdef) = "USE_BLUETOOTH_PROXY";
+
BluetoothScannerState state = 1;
+
BluetoothScannerMode mode = 2;
+
message BluetoothScannerSetModeRequest {
+
option(source) = SOURCE_CLIENT;
+
option(ifdef) = "USE_BLUETOOTH_PROXY";
+
BluetoothScannerMode mode = 1;
+
// ==================== VOICE ASSISTANT ====================
+
enum VoiceAssistantSubscribeFlag {
+
VOICE_ASSISTANT_SUBSCRIBE_NONE = 0;
+
VOICE_ASSISTANT_SUBSCRIBE_API_AUDIO = 1;
+
message SubscribeVoiceAssistantRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_VOICE_ASSISTANT";
+
enum VoiceAssistantRequestFlag {
+
VOICE_ASSISTANT_REQUEST_NONE = 0;
+
VOICE_ASSISTANT_REQUEST_USE_VAD = 1;
+
VOICE_ASSISTANT_REQUEST_USE_WAKE_WORD = 2;
+
message VoiceAssistantAudioSettings {
+
uint32 noise_suppression_level = 1;
+
float volume_multiplier = 3;
+
message VoiceAssistantRequest {
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_VOICE_ASSISTANT";
+
string conversation_id = 2;
+
VoiceAssistantAudioSettings audio_settings = 4;
+
string wake_word_phrase = 5;
+
message VoiceAssistantResponse {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_VOICE_ASSISTANT";
+
enum VoiceAssistantEvent {
+
VOICE_ASSISTANT_ERROR = 0;
+
VOICE_ASSISTANT_RUN_START = 1;
+
VOICE_ASSISTANT_RUN_END = 2;
+
VOICE_ASSISTANT_STT_START = 3;
+
VOICE_ASSISTANT_STT_END = 4;
+
VOICE_ASSISTANT_INTENT_START = 5;
+
VOICE_ASSISTANT_INTENT_END = 6;
+
VOICE_ASSISTANT_TTS_START = 7;
+
VOICE_ASSISTANT_TTS_END = 8;
+
VOICE_ASSISTANT_WAKE_WORD_START = 9;
+
VOICE_ASSISTANT_WAKE_WORD_END = 10;
+
VOICE_ASSISTANT_STT_VAD_START = 11;
+
VOICE_ASSISTANT_STT_VAD_END = 12;
+
VOICE_ASSISTANT_TTS_STREAM_START = 98;
+
VOICE_ASSISTANT_TTS_STREAM_END = 99;
+
VOICE_ASSISTANT_INTENT_PROGRESS = 100;
+
message VoiceAssistantEventData {
+
message VoiceAssistantEventResponse {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_VOICE_ASSISTANT";
+
VoiceAssistantEvent event_type = 1;
+
repeated VoiceAssistantEventData data = 2;
+
message VoiceAssistantAudio {
+
option (source) = SOURCE_BOTH;
+
option (ifdef) = "USE_VOICE_ASSISTANT";
+
enum VoiceAssistantTimerEvent {
+
VOICE_ASSISTANT_TIMER_STARTED = 0;
+
VOICE_ASSISTANT_TIMER_UPDATED = 1;
+
VOICE_ASSISTANT_TIMER_CANCELLED = 2;
+
VOICE_ASSISTANT_TIMER_FINISHED = 3;
+
message VoiceAssistantTimerEventResponse {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_VOICE_ASSISTANT";
+
VoiceAssistantTimerEvent event_type = 1;
+
uint32 total_seconds = 4;
+
uint32 seconds_left = 5;
+
message VoiceAssistantAnnounceRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_VOICE_ASSISTANT";
+
string preannounce_media_id = 3;
+
bool start_conversation = 4;
+
message VoiceAssistantAnnounceFinished {
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_VOICE_ASSISTANT";
+
message VoiceAssistantWakeWord {
+
repeated string trained_languages = 3;
+
message VoiceAssistantConfigurationRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_VOICE_ASSISTANT";
+
message VoiceAssistantConfigurationResponse {
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_VOICE_ASSISTANT";
+
repeated VoiceAssistantWakeWord available_wake_words = 1;
+
repeated string active_wake_words = 2;
+
uint32 max_active_wake_words = 3;
+
message VoiceAssistantSetConfiguration {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_VOICE_ASSISTANT";
+
repeated string active_wake_words = 1;
+
// ==================== ALARM CONTROL PANEL ====================
+
enum AlarmControlPanelState {
+
ALARM_STATE_DISARMED = 0;
+
ALARM_STATE_ARMED_HOME = 1;
+
ALARM_STATE_ARMED_AWAY = 2;
+
ALARM_STATE_ARMED_NIGHT = 3;
+
ALARM_STATE_ARMED_VACATION = 4;
+
ALARM_STATE_ARMED_CUSTOM_BYPASS = 5;
+
ALARM_STATE_PENDING = 6;
+
ALARM_STATE_ARMING = 7;
+
ALARM_STATE_DISARMING = 8;
+
ALARM_STATE_TRIGGERED = 9;
+
enum AlarmControlPanelStateCommand {
+
ALARM_CONTROL_PANEL_DISARM = 0;
+
ALARM_CONTROL_PANEL_ARM_AWAY = 1;
+
ALARM_CONTROL_PANEL_ARM_HOME = 2;
+
ALARM_CONTROL_PANEL_ARM_NIGHT = 3;
+
ALARM_CONTROL_PANEL_ARM_VACATION = 4;
+
ALARM_CONTROL_PANEL_ARM_CUSTOM_BYPASS = 5;
+
ALARM_CONTROL_PANEL_TRIGGER = 6;
+
message ListEntitiesAlarmControlPanelResponse {
+
option (base_class) = "InfoResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_ALARM_CONTROL_PANEL";
+
bool disabled_by_default = 6;
+
EntityCategory entity_category = 7;
+
uint32 supported_features = 8;
+
bool requires_code = 9;
+
bool requires_code_to_arm = 10;
+
message AlarmControlPanelStateResponse {
+
option (base_class) = "StateResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_ALARM_CONTROL_PANEL";
+
option (no_delay) = true;
+
AlarmControlPanelState state = 2;
+
message AlarmControlPanelCommandRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_ALARM_CONTROL_PANEL";
+
option (no_delay) = true;
+
AlarmControlPanelStateCommand command = 2;
+
// ===================== TEXT =====================
+
TEXT_MODE_PASSWORD = 1;
+
message ListEntitiesTextResponse {
+
option (base_class) = "InfoResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_TEXT";
+
bool disabled_by_default = 6;
+
EntityCategory entity_category = 7;
+
message TextStateResponse {
+
option (base_class) = "StateResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_TEXT";
+
option (no_delay) = true;
+
// If the Text does not have a valid state yet.
+
// Equivalent to `!obj->has_state()` - inverse logic to make state packets smaller
+
bool missing_state = 3;
+
message TextCommandRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_TEXT";
+
option (no_delay) = true;
+
// ==================== DATETIME DATE ====================
+
message ListEntitiesDateResponse {
+
option (base_class) = "InfoResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_DATETIME_DATE";
+
bool disabled_by_default = 6;
+
EntityCategory entity_category = 7;
+
message DateStateResponse {
+
option (base_class) = "StateResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_DATETIME_DATE";
+
option (no_delay) = true;
+
// If the date does not have a valid state yet.
+
// Equivalent to `!obj->has_state()` - inverse logic to make state packets smaller
+
bool missing_state = 2;
+
message DateCommandRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_DATETIME_DATE";
+
option (no_delay) = true;
+
// ==================== DATETIME TIME ====================
+
message ListEntitiesTimeResponse {
+
option (base_class) = "InfoResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_DATETIME_TIME";
+
bool disabled_by_default = 6;
+
EntityCategory entity_category = 7;
+
message TimeStateResponse {
+
option (base_class) = "StateResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_DATETIME_TIME";
+
option (no_delay) = true;
+
// If the time does not have a valid state yet.
+
// Equivalent to `!obj->has_state()` - inverse logic to make state packets smaller
+
bool missing_state = 2;
+
message TimeCommandRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_DATETIME_TIME";
+
option (no_delay) = true;
+
// ==================== EVENT ====================
+
message ListEntitiesEventResponse {
+
option (base_class) = "InfoResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_EVENT";
+
bool disabled_by_default = 6;
+
EntityCategory entity_category = 7;
+
string device_class = 8;
+
repeated string event_types = 9;
+
message EventResponse {
+
option (base_class) = "StateResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_EVENT";
+
// ==================== VALVE ====================
+
message ListEntitiesValveResponse {
+
option (base_class) = "InfoResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_VALVE";
+
bool disabled_by_default = 6;
+
EntityCategory entity_category = 7;
+
string device_class = 8;
+
bool assumed_state = 9;
+
bool supports_position = 10;
+
bool supports_stop = 11;
+
VALVE_OPERATION_IDLE = 0;
+
VALVE_OPERATION_IS_OPENING = 1;
+
VALVE_OPERATION_IS_CLOSING = 2;
+
message ValveStateResponse {
+
option (base_class) = "StateResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_VALVE";
+
option (no_delay) = true;
+
ValveOperation current_operation = 3;
+
message ValveCommandRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_VALVE";
+
option (no_delay) = true;
+
// ==================== DATETIME DATETIME ====================
+
message ListEntitiesDateTimeResponse {
+
option (base_class) = "InfoResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_DATETIME_DATETIME";
+
bool disabled_by_default = 6;
+
EntityCategory entity_category = 7;
+
message DateTimeStateResponse {
+
option (base_class) = "StateResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_DATETIME_DATETIME";
+
option (no_delay) = true;
+
// If the datetime does not have a valid state yet.
+
// Equivalent to `!obj->has_state()` - inverse logic to make state packets smaller
+
bool missing_state = 2;
+
fixed32 epoch_seconds = 3;
+
message DateTimeCommandRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_DATETIME_DATETIME";
+
option (no_delay) = true;
+
fixed32 epoch_seconds = 2;
+
// ==================== UPDATE ====================
+
message ListEntitiesUpdateResponse {
+
option (base_class) = "InfoResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_UPDATE";
+
bool disabled_by_default = 6;
+
EntityCategory entity_category = 7;
+
string device_class = 8;
+
message UpdateStateResponse {
+
option (base_class) = "StateResponseProtoMessage";
+
option (source) = SOURCE_SERVER;
+
option (ifdef) = "USE_UPDATE";
+
option (no_delay) = true;
+
bool missing_state = 2;
+
string current_version = 6;
+
string latest_version = 7;
+
string release_summary = 9;
+
string release_url = 10;
+
UPDATE_COMMAND_NONE = 0;
+
UPDATE_COMMAND_UPDATE = 1;
+
UPDATE_COMMAND_CHECK = 2;
+
message UpdateCommandRequest {
+
option (source) = SOURCE_CLIENT;
+
option (ifdef) = "USE_UPDATE";
+
option (no_delay) = true;
+
UpdateCommand command = 2;