mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	missing ifdefs
This commit is contained in:
		| @@ -713,33 +713,45 @@ void DeviceInfoResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->model).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_DEEP_SLEEP | ||||
|   out.append("  has_deep_sleep: "); | ||||
|   out.append(YESNO(this->has_deep_sleep)); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
| #ifdef ESPHOME_PROJECT_NAME | ||||
|   out.append("  project_name: "); | ||||
|   out.append("'").append(this->project_name).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
| #ifdef ESPHOME_PROJECT_NAME | ||||
|   out.append("  project_version: "); | ||||
|   out.append("'").append(this->project_version).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
| #ifdef USE_WEBSERVER | ||||
|   out.append("  webserver_port: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->webserver_port); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
| #ifdef USE_BLUETOOTH_PROXY | ||||
|   out.append("  legacy_bluetooth_proxy_version: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->legacy_bluetooth_proxy_version); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
| #ifdef USE_BLUETOOTH_PROXY | ||||
|   out.append("  bluetooth_proxy_feature_flags: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->bluetooth_proxy_feature_flags); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("  manufacturer: "); | ||||
|   out.append("'").append(this->manufacturer).append("'"); | ||||
|   out.append("\n"); | ||||
| @@ -748,43 +760,60 @@ void DeviceInfoResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->friendly_name).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_VOICE_ASSISTANT | ||||
|   out.append("  legacy_voice_assistant_version: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->legacy_voice_assistant_version); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
| #ifdef USE_VOICE_ASSISTANT | ||||
|   out.append("  voice_assistant_feature_flags: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->voice_assistant_feature_flags); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
| #ifdef USE_AREAS | ||||
|   out.append("  suggested_area: "); | ||||
|   out.append("'").append(this->suggested_area).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
| #ifdef USE_BLUETOOTH_PROXY | ||||
|   out.append("  bluetooth_mac_address: "); | ||||
|   out.append("'").append(this->bluetooth_mac_address).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
| #ifdef USE_API_NOISE | ||||
|   out.append("  api_encryption_supported: "); | ||||
|   out.append(YESNO(this->api_encryption_supported)); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
| #ifdef USE_DEVICES | ||||
|   for (const auto &it : this->devices) { | ||||
|     out.append("  devices: "); | ||||
|     it.dump_to(out); | ||||
|     out.append("\n"); | ||||
|   } | ||||
|  | ||||
| #endif | ||||
| #ifdef USE_AREAS | ||||
|   for (const auto &it : this->areas) { | ||||
|     out.append("  areas: "); | ||||
|     it.dump_to(out); | ||||
|     out.append("\n"); | ||||
|   } | ||||
|  | ||||
| #endif | ||||
| #ifdef USE_AREAS | ||||
|   out.append("  area: "); | ||||
|   this->area.dump_to(out); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| void ListEntitiesRequest::dump_to(std::string &out) const { out.append("ListEntitiesRequest {}"); } | ||||
| @@ -823,18 +852,23 @@ void ListEntitiesBinarySensorResponse::dump_to(std::string &out) const { | ||||
|   out.append(YESNO(this->disabled_by_default)); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_ENTITY_ICON | ||||
|   out.append("  icon: "); | ||||
|   out.append("'").append(this->icon).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("  entity_category: "); | ||||
|   out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category)); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| void BinarySensorStateResponse::dump_to(std::string &out) const { | ||||
| @@ -901,10 +935,12 @@ void ListEntitiesCoverResponse::dump_to(std::string &out) const { | ||||
|   out.append(YESNO(this->disabled_by_default)); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_ENTITY_ICON | ||||
|   out.append("  icon: "); | ||||
|   out.append("'").append(this->icon).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("  entity_category: "); | ||||
|   out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category)); | ||||
|   out.append("\n"); | ||||
| @@ -913,10 +949,13 @@ void ListEntitiesCoverResponse::dump_to(std::string &out) const { | ||||
|   out.append(YESNO(this->supports_stop)); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| void CoverStateResponse::dump_to(std::string &out) const { | ||||
| @@ -989,10 +1028,13 @@ void CoverCommandRequest::dump_to(std::string &out) const { | ||||
|   out.append(YESNO(this->stop)); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| #endif | ||||
| @@ -1038,10 +1080,12 @@ void ListEntitiesFanResponse::dump_to(std::string &out) const { | ||||
|   out.append(YESNO(this->disabled_by_default)); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_ENTITY_ICON | ||||
|   out.append("  icon: "); | ||||
|   out.append("'").append(this->icon).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("  entity_category: "); | ||||
|   out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category)); | ||||
|   out.append("\n"); | ||||
| @@ -1052,10 +1096,13 @@ void ListEntitiesFanResponse::dump_to(std::string &out) const { | ||||
|     out.append("\n"); | ||||
|   } | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| void FanStateResponse::dump_to(std::string &out) const { | ||||
| @@ -1091,10 +1138,13 @@ void FanStateResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->preset_mode).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| void FanCommandRequest::dump_to(std::string &out) const { | ||||
| @@ -1224,18 +1274,23 @@ void ListEntitiesLightResponse::dump_to(std::string &out) const { | ||||
|   out.append(YESNO(this->disabled_by_default)); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_ENTITY_ICON | ||||
|   out.append("  icon: "); | ||||
|   out.append("'").append(this->icon).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("  entity_category: "); | ||||
|   out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category)); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| void LightStateResponse::dump_to(std::string &out) const { | ||||
| @@ -1460,10 +1515,12 @@ void ListEntitiesSensorResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->unique_id).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_ENTITY_ICON | ||||
|   out.append("  icon: "); | ||||
|   out.append("'").append(this->icon).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("  unit_of_measurement: "); | ||||
|   out.append("'").append(this->unit_of_measurement).append("'"); | ||||
|   out.append("\n"); | ||||
| @@ -1548,10 +1605,12 @@ void ListEntitiesSwitchResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->unique_id).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_ENTITY_ICON | ||||
|   out.append("  icon: "); | ||||
|   out.append("'").append(this->icon).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("  assumed_state: "); | ||||
|   out.append(YESNO(this->assumed_state)); | ||||
|   out.append("\n"); | ||||
| @@ -1568,10 +1627,13 @@ void ListEntitiesSwitchResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->device_class).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| void SwitchStateResponse::dump_to(std::string &out) const { | ||||
| @@ -1632,10 +1694,12 @@ void ListEntitiesTextSensorResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->unique_id).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_ENTITY_ICON | ||||
|   out.append("  icon: "); | ||||
|   out.append("'").append(this->icon).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("  disabled_by_default: "); | ||||
|   out.append(YESNO(this->disabled_by_default)); | ||||
|   out.append("\n"); | ||||
| @@ -1648,10 +1712,13 @@ void ListEntitiesTextSensorResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->device_class).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| void TextSensorStateResponse::dump_to(std::string &out) const { | ||||
| @@ -1939,18 +2006,23 @@ void ListEntitiesCameraResponse::dump_to(std::string &out) const { | ||||
|   out.append(YESNO(this->disabled_by_default)); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_ENTITY_ICON | ||||
|   out.append("  icon: "); | ||||
|   out.append("'").append(this->icon).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("  entity_category: "); | ||||
|   out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category)); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| void CameraImageResponse::dump_to(std::string &out) const { | ||||
| @@ -2080,10 +2152,12 @@ void ListEntitiesClimateResponse::dump_to(std::string &out) const { | ||||
|   out.append(YESNO(this->disabled_by_default)); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_ENTITY_ICON | ||||
|   out.append("  icon: "); | ||||
|   out.append("'").append(this->icon).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("  entity_category: "); | ||||
|   out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category)); | ||||
|   out.append("\n"); | ||||
| @@ -2111,10 +2185,13 @@ void ListEntitiesClimateResponse::dump_to(std::string &out) const { | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| void ClimateStateResponse::dump_to(std::string &out) const { | ||||
| @@ -2187,10 +2264,13 @@ void ClimateStateResponse::dump_to(std::string &out) const { | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| void ClimateCommandRequest::dump_to(std::string &out) const { | ||||
| @@ -2321,10 +2401,12 @@ void ListEntitiesNumberResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->unique_id).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_ENTITY_ICON | ||||
|   out.append("  icon: "); | ||||
|   out.append("'").append(this->icon).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("  min_value: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%g", this->min_value); | ||||
|   out.append(buffer); | ||||
| @@ -2430,10 +2512,12 @@ void ListEntitiesSelectResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->unique_id).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_ENTITY_ICON | ||||
|   out.append("  icon: "); | ||||
|   out.append("'").append(this->icon).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   for (const auto &it : this->options) { | ||||
|     out.append("  options: "); | ||||
|     out.append("'").append(it).append("'"); | ||||
| @@ -2448,10 +2532,13 @@ void ListEntitiesSelectResponse::dump_to(std::string &out) const { | ||||
|   out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category)); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| void SelectStateResponse::dump_to(std::string &out) const { | ||||
| @@ -2516,10 +2603,12 @@ void ListEntitiesSirenResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->unique_id).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_ENTITY_ICON | ||||
|   out.append("  icon: "); | ||||
|   out.append("'").append(this->icon).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("  disabled_by_default: "); | ||||
|   out.append(YESNO(this->disabled_by_default)); | ||||
|   out.append("\n"); | ||||
| @@ -2542,10 +2631,13 @@ void ListEntitiesSirenResponse::dump_to(std::string &out) const { | ||||
|   out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category)); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| void SirenStateResponse::dump_to(std::string &out) const { | ||||
| @@ -2608,10 +2700,13 @@ void SirenCommandRequest::dump_to(std::string &out) const { | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| #endif | ||||
| @@ -2636,10 +2731,12 @@ void ListEntitiesLockResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->unique_id).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_ENTITY_ICON | ||||
|   out.append("  icon: "); | ||||
|   out.append("'").append(this->icon).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("  disabled_by_default: "); | ||||
|   out.append(YESNO(this->disabled_by_default)); | ||||
|   out.append("\n"); | ||||
| @@ -2664,10 +2761,13 @@ void ListEntitiesLockResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->code_format).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| void LockStateResponse::dump_to(std::string &out) const { | ||||
| @@ -2736,10 +2836,12 @@ void ListEntitiesButtonResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->unique_id).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_ENTITY_ICON | ||||
|   out.append("  icon: "); | ||||
|   out.append("'").append(this->icon).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("  disabled_by_default: "); | ||||
|   out.append(YESNO(this->disabled_by_default)); | ||||
|   out.append("\n"); | ||||
| @@ -2752,10 +2854,13 @@ void ListEntitiesButtonResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->device_class).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| void ButtonCommandRequest::dump_to(std::string &out) const { | ||||
| @@ -2821,10 +2926,12 @@ void ListEntitiesMediaPlayerResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->unique_id).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_ENTITY_ICON | ||||
|   out.append("  icon: "); | ||||
|   out.append("'").append(this->icon).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("  disabled_by_default: "); | ||||
|   out.append(YESNO(this->disabled_by_default)); | ||||
|   out.append("\n"); | ||||
| @@ -2843,10 +2950,13 @@ void ListEntitiesMediaPlayerResponse::dump_to(std::string &out) const { | ||||
|     out.append("\n"); | ||||
|   } | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| void MediaPlayerStateResponse::dump_to(std::string &out) const { | ||||
| @@ -2917,10 +3027,13 @@ void MediaPlayerCommandRequest::dump_to(std::string &out) const { | ||||
|   out.append(YESNO(this->announcement)); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| #endif | ||||
| @@ -3682,10 +3795,12 @@ void ListEntitiesAlarmControlPanelResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->unique_id).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_ENTITY_ICON | ||||
|   out.append("  icon: "); | ||||
|   out.append("'").append(this->icon).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("  disabled_by_default: "); | ||||
|   out.append(YESNO(this->disabled_by_default)); | ||||
|   out.append("\n"); | ||||
| @@ -3707,10 +3822,13 @@ void ListEntitiesAlarmControlPanelResponse::dump_to(std::string &out) const { | ||||
|   out.append(YESNO(this->requires_code_to_arm)); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| void AlarmControlPanelStateResponse::dump_to(std::string &out) const { | ||||
| @@ -3775,10 +3893,12 @@ void ListEntitiesTextResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->unique_id).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_ENTITY_ICON | ||||
|   out.append("  icon: "); | ||||
|   out.append("'").append(this->icon).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("  disabled_by_default: "); | ||||
|   out.append(YESNO(this->disabled_by_default)); | ||||
|   out.append("\n"); | ||||
| @@ -3805,10 +3925,13 @@ void ListEntitiesTextResponse::dump_to(std::string &out) const { | ||||
|   out.append(proto_enum_to_string<enums::TextMode>(this->mode)); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| void TextStateResponse::dump_to(std::string &out) const { | ||||
| @@ -3873,10 +3996,12 @@ void ListEntitiesDateResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->unique_id).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_ENTITY_ICON | ||||
|   out.append("  icon: "); | ||||
|   out.append("'").append(this->icon).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("  disabled_by_default: "); | ||||
|   out.append(YESNO(this->disabled_by_default)); | ||||
|   out.append("\n"); | ||||
| @@ -3885,10 +4010,13 @@ void ListEntitiesDateResponse::dump_to(std::string &out) const { | ||||
|   out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category)); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| void DateStateResponse::dump_to(std::string &out) const { | ||||
| @@ -3975,10 +4103,12 @@ void ListEntitiesTimeResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->unique_id).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_ENTITY_ICON | ||||
|   out.append("  icon: "); | ||||
|   out.append("'").append(this->icon).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("  disabled_by_default: "); | ||||
|   out.append(YESNO(this->disabled_by_default)); | ||||
|   out.append("\n"); | ||||
| @@ -3987,10 +4117,13 @@ void ListEntitiesTimeResponse::dump_to(std::string &out) const { | ||||
|   out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category)); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| void TimeStateResponse::dump_to(std::string &out) const { | ||||
| @@ -4077,10 +4210,12 @@ void ListEntitiesEventResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->unique_id).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_ENTITY_ICON | ||||
|   out.append("  icon: "); | ||||
|   out.append("'").append(this->icon).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("  disabled_by_default: "); | ||||
|   out.append(YESNO(this->disabled_by_default)); | ||||
|   out.append("\n"); | ||||
| @@ -4099,10 +4234,13 @@ void ListEntitiesEventResponse::dump_to(std::string &out) const { | ||||
|     out.append("\n"); | ||||
|   } | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| void EventResponse::dump_to(std::string &out) const { | ||||
| @@ -4145,10 +4283,12 @@ void ListEntitiesValveResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->unique_id).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_ENTITY_ICON | ||||
|   out.append("  icon: "); | ||||
|   out.append("'").append(this->icon).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("  disabled_by_default: "); | ||||
|   out.append(YESNO(this->disabled_by_default)); | ||||
|   out.append("\n"); | ||||
| @@ -4173,10 +4313,13 @@ void ListEntitiesValveResponse::dump_to(std::string &out) const { | ||||
|   out.append(YESNO(this->supports_stop)); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| void ValveStateResponse::dump_to(std::string &out) const { | ||||
| @@ -4251,10 +4394,12 @@ void ListEntitiesDateTimeResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->unique_id).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_ENTITY_ICON | ||||
|   out.append("  icon: "); | ||||
|   out.append("'").append(this->icon).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("  disabled_by_default: "); | ||||
|   out.append(YESNO(this->disabled_by_default)); | ||||
|   out.append("\n"); | ||||
| @@ -4263,10 +4408,13 @@ void ListEntitiesDateTimeResponse::dump_to(std::string &out) const { | ||||
|   out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category)); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| void DateTimeStateResponse::dump_to(std::string &out) const { | ||||
| @@ -4333,10 +4481,12 @@ void ListEntitiesUpdateResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->unique_id).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_ENTITY_ICON | ||||
|   out.append("  icon: "); | ||||
|   out.append("'").append(this->icon).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("  disabled_by_default: "); | ||||
|   out.append(YESNO(this->disabled_by_default)); | ||||
|   out.append("\n"); | ||||
| @@ -4349,10 +4499,13 @@ void ListEntitiesUpdateResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->device_class).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| void UpdateStateResponse::dump_to(std::string &out) const { | ||||
| @@ -4400,10 +4553,13 @@ void UpdateStateResponse::dump_to(std::string &out) const { | ||||
|   out.append("'").append(this->release_url).append("'"); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #ifdef USE_DEVICES | ||||
|   out.append("  device_id: "); | ||||
|   snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id); | ||||
|   out.append(buffer); | ||||
|   out.append("\n"); | ||||
|  | ||||
| #endif | ||||
|   out.append("}"); | ||||
| } | ||||
| void UpdateCommandRequest::dump_to(std::string &out) const { | ||||
|   | ||||
| @@ -1177,7 +1177,12 @@ def build_message_type( | ||||
|                     wrap_with_ifdef(ti.decode_64bit_content, field_ifdef) | ||||
|                 ) | ||||
|         if ti.dump_content: | ||||
|             dump.append(ti.dump_content) | ||||
|             # Check for field_ifdef option for dump as well | ||||
|             field_ifdef = None | ||||
|             if field.options.HasExtension(pb.field_ifdef): | ||||
|                 field_ifdef = field.options.Extensions[pb.field_ifdef] | ||||
|  | ||||
|             dump.extend(wrap_with_ifdef(ti.dump_content, field_ifdef)) | ||||
|  | ||||
|     cpp = "" | ||||
|     if decode_varint: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user